mirror of
https://github.com/robonen/metr.git
synced 2026-03-20 10:54:41 +00:00
Offer search
This commit is contained in:
@@ -79,4 +79,16 @@ class OfferFilter extends QueryFilter
|
||||
|
||||
return $this->builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $word
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
protected function search(string $word): Builder
|
||||
{
|
||||
if (!empty(trim($word)))
|
||||
return $this->builder->where('name', 'LIKE', "%{$word}%");
|
||||
|
||||
return $this->builder;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user