Browse Source

Permet la recherche dans la description

laravel_8
Clement 10 months ago
parent
commit
491fd2fa8d
  1. 4
      app/Home.php

4
app/Home.php

@ -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

Loading…
Cancel
Save