mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Add docblock
This commit is contained in:
parent
9078d4c71c
commit
054d71aedc
|
@ -283,6 +283,14 @@ trait Searchable
|
|||
return 'CONCAT(' . implode('," ",', $columns) . ') LIKE ?';
|
||||
}
|
||||
|
||||
/**
|
||||
* Search a string across multiple columns separated with a space.
|
||||
*
|
||||
* @param Builder $query
|
||||
* @param array $columns - Columns to include in search string.
|
||||
* @param $term
|
||||
* @return Builder
|
||||
*/
|
||||
public function scopeOrWhereMultipleColumns($query, array $columns, $term)
|
||||
{
|
||||
return $query->orWhereRaw($this->buildMultipleColumnSearch($columns), ["%{$term}%"]);
|
||||
|
|
Loading…
Reference in a new issue