mdhesari / laravel-query-filters
Easily apply query filters in your controllers.
3.4.1
2023-09-24 09:17 UTC
Requires
- php: ^8.0
- ext-pdo: *
- friendsofphp/php-cs-fixer: ^3.4
- wendelladriel/laravel-validated-dto: ^2.11
Requires (Dev)
- orchestra/testbench: ^7.0|^6.0|^5.0
This package is auto-updated.
Last update: 2024-10-24 11:49:05 UTC
README
Cool idea to apply query filters in your controllers.
Install
composer require mdhesari/laravel-query-filters
Usage
public function index(\Illuminate\Http\Request $request, \Mdhesari\LaravelQueryFilters\Actions\ApplyQueryFilters $applyQueryFilters) { return $applyQueryFilters(\MyModel::query(), $request->all())->paginate(); }
Actions
Query filters are a bunch of actions that you can use in order to filter your controllers.
Extend
We have provided some default filters in the default action that you can extend it with its abstract implementation.