Open ysyap1104 opened 5 years ago
You can find the SearchableTrait.php file and cange the name of the Scope
public function scopeSearch(Builder $q, $search, $threshold = null, $entireText = false, $entireTextOnly = false)
{
return $this->scopeSearchRestricted($q, $search, null, $threshold, $entireText, $entireTextOnly);
}
To:
public function scopeSearchScope(Builder $q, $search, $threshold = null, $entireText = false, $entireTextOnly = false)
{
return $this->scopeSearchRestricted($q, $search, null, $threshold, $entireText, $entireTextOnly);
}
Hi everyone,
Im using searchable traits in my website and I would like to know how can I change the method name search into something else?
Ex: user::search($query) to user::searchScope($query)
Thank you for your help.