From 1184cb68b2cc39321ad6abb885563c738b03aa8c Mon Sep 17 00:00:00 2001 From: Ayhan Date: Mon, 8 Jul 2019 20:49:10 +0300 Subject: [PATCH] Keywords validate error fixed --- models/Realty.php | 12 ++++++------ models/Tag.php | 3 +-- updates/version.yaml | 4 +++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/models/Realty.php b/models/Realty.php index 94fdc6e..4047413 100755 --- a/models/Realty.php +++ b/models/Realty.php @@ -223,12 +223,12 @@ public function scopeListFrontEnd($query, $options) $order = 'asc'; } - $sql = $query->toSql(); - foreach($query->getBindings() as $binding) - { - $value = is_numeric($binding) ? $binding : "'".$binding."'"; - $sql = preg_replace('/\?/', $value, $sql, 1); - } + //$sql = $query->toSql(); + //foreach($query->getBindings() as $binding) + //{ + // $value = is_numeric($binding) ? $binding : "'".$binding."'"; + // $sql = preg_replace('/\?/', $value, $sql, 1); + //} //throw new \October\Rain\Exception\ApplicationException($sql); return $query->paginate($perPage, $page); diff --git a/models/Tag.php b/models/Tag.php index a4581f3..c174ded 100755 --- a/models/Tag.php +++ b/models/Tag.php @@ -20,13 +20,12 @@ class Tag extends Model * Validation */ public $rules = [ - 'title' => 'required|unique:mavitm_estate_tags|regex:/^[a-z0-9-_]+$/' + 'title' => 'required|unique:mavitm_estate_tags' ]; public $customMessages = [ 'title.required' => 'A tag title is required.', 'title.unique' => 'A tag by that title already exists.', - 'title.regex' => 'Tags may only contain alpha-numeric characters and hyphens.' ]; public $belongsToMany = [ diff --git a/updates/version.yaml b/updates/version.yaml index 210fafb..fc0835b 100755 --- a/updates/version.yaml +++ b/updates/version.yaml @@ -26,4 +26,6 @@ 1.0.10: - 'Edit category view' 1.1.0: - - 'edit search component' \ No newline at end of file + - 'edit search component' +1.1.1: + - 'Keywords validate error fixed' \ No newline at end of file