Add docblock

This commit is contained in:
Marcus Moore 2023-05-23 13:37:04 -07:00
parent 9078d4c71c
commit 054d71aedc
No known key found for this signature in database

View file

@ -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}%"]);