Permet la recherche dans la description

This commit is contained in:
Clement 2020-09-25 10:16:56 +02:00
parent 8940b5ca6a
commit 491fd2fa8d

View File

@ -29,7 +29,9 @@ class Home extends Model implements Feedable
public function scopeComment(QueryBuilder $query, $comment): QueryBuilder
{
return $query->where('comment', 'LIKE', '%'.$comment.'%');
return $query
->where('comment', 'LIKE', '%'.$comment.'%')
->orWhere('description', 'LIKE', '%'.$comment.'%');
}
public function scopePriceMax(QueryBuilder $query, $price): QueryBuilder