Any way to add filter to global search?
Not sure if I selected the right tag, but is there any way to add a search filter to global search? I have organizations set and would like to filter results of global search to remain within that organization. I've attempted the following function, which produces an empty result, but clicking it still links to the hidden result.
2 Replies
why dont u use scope? if you scope your model the scope apply to global search.
https://laravel.com/docs/10.x/eloquent#query-scopes
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
I'll have to check it out, thanks!