laravel-cross-eloquent-search
laravel-cross-eloquent-search copied to clipboard
Laravel package to search through multiple Eloquent models. Supports sorting, pagination, scoped queries, eager load relationships and searching through single or multiple columns.
Can I full search in a related model? E.g. ```php $conversations = Search::addFullText(Conversation::class, ['messages.body', 'messages.subject'], ['mode' => 'boolean']) ->paginate(10) ->search(request('search')); ``` The error I receive is: `SQLSTATE[42S22]: Column not found:...
Hello, Love this package! Any thoughts on how I could use the limit / offset eloquent methods vs paginate? I'm handling pagination a little differently in one project and would...
I added support for SQLite3. If you have any ideas on how to test this via unit or feature tests, let me know.
``` $users = User::filtering($request)->select('*')->with('Role')->access($request) ->selectRaw('(SELECT roles.name FROM roles, role_users WHERE users.id = role_users.user_id AND role_users.role_id = roles.id LIMIT 1) as rolename') ->groupBy('id'); $query = Search::new() ->add($users, ['first_name', 'last_name','role.slug']) ->paginate(\Request::get('per_page') ?:...
I kinda need to search in some column that holds html stuff and I must search as ``` orWhereRaw('regexp_replace(description, "]*>", "") like ?', "%{$searchTerm}%") ->orWhereRaw('regexp_replace(description, "]*>", "") like ?', '%'...
This is not an issue but a thank you note. :) I created a demo using this package on an Advanced search and filter with Laravel 8 and Livewire 2....
Hi I am first time using this package. I am trying to get search results from multiple models. ``` $this->results = Search::new() ->add(User::where('type', 'student'), ['name', 'email']) ->add(Question::class, ['id', 'text']) ->add(Chapter::class,...
Hej, are there any plans to support SQLite3 as database driver? I am developing my apps with SQLite3 on my machine and with MySQL on the production server. So far...
I want to sort main result set by relation in an order.. eg lets say a post has many tags i want to get all post but they should be...
Hello, I love this package so much, it does not play nice with pagination options like withQueryString()