Skip to content

Commit

Permalink
Keywords validate error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mavitm committed Jul 8, 2019
1 parent 0ce4831 commit 1184cb6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions models/Realty.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions models/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
4 changes: 3 additions & 1 deletion updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@
1.0.10:
- 'Edit category view'
1.1.0:
- 'edit search component'
- 'edit search component'
1.1.1:
- 'Keywords validate error fixed'

0 comments on commit 1184cb6

Please sign in to comment.