mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-11 08:04:09 -08:00
Merge branch 'develop'
This commit is contained in:
commit
a0d8aa77d3
|
@ -36,4 +36,21 @@ class Group extends SnipeModel
|
||||||
{
|
{
|
||||||
return json_decode($this->permissions, true);
|
return json_decode($this->permissions, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Query builder scope to search on text
|
||||||
|
*
|
||||||
|
* @param Illuminate\Database\Query\Builder $query Query builder instance
|
||||||
|
* @param text $search Search term
|
||||||
|
*
|
||||||
|
* @return Illuminate\Database\Query\Builder Modified query builder
|
||||||
|
*/
|
||||||
|
public function scopeTextSearch($query, $search)
|
||||||
|
{
|
||||||
|
|
||||||
|
return $query->where(function ($query) use ($search) {
|
||||||
|
|
||||||
|
$query->where('name', 'LIKE', '%'.$search.'%');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,4 +10,4 @@ fi
|
||||||
|
|
||||||
wget https://raw.githubusercontent.com/snipe/snipe-it/master/snipeit.sh
|
wget https://raw.githubusercontent.com/snipe/snipe-it/master/snipeit.sh
|
||||||
chmod 744 snipeit.sh
|
chmod 744 snipeit.sh
|
||||||
sudo ./snipeit.sh 2>&1 | sudo tee -a /var/log/snipeit-install.log
|
./snipeit.sh 2>&1 | tee -a /var/log/snipeit-install.log
|
Loading…
Reference in a new issue