mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Add docblock
This commit is contained in:
parent
9078d4c71c
commit
054d71aedc
|
@ -283,6 +283,14 @@ trait Searchable
|
||||||
return 'CONCAT(' . implode('," ",', $columns) . ') LIKE ?';
|
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)
|
public function scopeOrWhereMultipleColumns($query, array $columns, $term)
|
||||||
{
|
{
|
||||||
return $query->orWhereRaw($this->buildMultipleColumnSearch($columns), ["%{$term}%"]);
|
return $query->orWhereRaw($this->buildMultipleColumnSearch($columns), ["%{$term}%"]);
|
||||||
|
|
Loading…
Reference in a new issue