server Side search is not working
amunyua opened this issue · 6 comments
Hi, server side searching is not working even on your demo.
Hi guys, yes the problem is still present, I've tested it
check my recorded screen
test.mp4
Thanks for notifying,
Here is the implementation
By default it filters only in primary key
You can implement scope in your model called scopeGlobalSearch
For your default user model, you can use following example
public function scopeGlobalSearch(Builder $query, $value): void
{
$query
->whereId($value)
->orWhere('name', 'LIKE', '%' . $value . '%')
->orWhere('email', 'LIKE', '%' . $value . '%');
}
Thanks for notifying,
Here is the implementation
By default it filters only in primary key
You can implement scope in your model called scopeGlobalSearch
For your default user model, you can use following example
public function scopeGlobalSearch(Builder $query, $value): void { $query ->whereId($value) ->orWhere('name', 'LIKE', '%' . $value . '%') ->orWhere('email', 'LIKE', '%' . $value . '%'); }
Thank you @rxcod9
Can you update your demo link too to filter all columns ?
@vitormicillo Just updated with id, name and email
Build failed due to larapack