Download the PHP package dinhquochan/laravel-query-filters without Composer
On this page you can find all versions of the php package dinhquochan/laravel-query-filters. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dinhquochan/laravel-query-filters
More information about dinhquochan/laravel-query-filters
Files in dinhquochan/laravel-query-filters
Package laravel-query-filters
Short Description Query filters in Laravel
License MIT
Homepage https://github.com/dnhquochan/laravel-query-filters
Informations about the package laravel-query-filters
Laravel Query Filters
Laravel Query Filters for Laravel.
Requirements
- PHP >= 7.4, >= 8.0
- Laravel >= 6.0
Installation
You can install the package via composer:
If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php
Basic usage
Create basic filter app/Filters/PostFilter.php
:
In App\Http\Controllers\PostController
:
Making a new filter
The package included an artisan command to create a new filter.
This filter will have the App\Http\Filters
namespace and will be saved in app/Http/Filters
.
or into a custom namespace, say, App\Blog
This filter will have the App\Blog
namespace and will be saved in app/Blog
.
Available traits
Sortable
Allow to sort items, you must add $sortable
property, default if not call sort
and sort_by
in request, the trait will add default sorting column to query:
Example:
Searchable
Allow to search items, you must add $searchable
property:
Example:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Dinh Quoc Han
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-query-filters with dependencies
illuminate/console Version ^6.20|^7.30|^8.75
illuminate/database Version ^6.20|^7.30|^8.75
illuminate/http Version ^6.20|^7.30|^8.75
illuminate/support Version ^6.20|^7.30|^8.75