Download the PHP package maksa988/laravel-filters without Composer
On this page you can find all versions of the php package maksa988/laravel-filters. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-filters
Laravel Filters
Filter models for Laravel.
PHP >= 5.6.4, Laravel >= 5.3
Installation
Filters for Laravel is installed via Composer.
For most uses, you will need to require maksa988/laravel-filters
and an individual gateway:
Usage
First you need to create a filter, you can do this using the artisan command php artisan make:filter PostFilter
.
After that the App\Filters
directory will be created and the PostFilter
filter will be created there.
In the filter class, create methods whose names you must specify in the $filters
array. The method will receive the value that will be accepted from the request.
Elequent builder is available in the class to compile a query that will be called when filtering data.
You can use the filter in the model by simply calling the scope filter
, passing the class with the filter there.
In order for scope to be available in the model, you need to connect trait Maksa988\LaravelFilters\Traits\HasFilters
:
To filter data by the title filter in the address, just pass a field with that name, for example, this can be done using GET:
http://example.com/posts?title=Post%20title
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 send me an email at [email protected] instead of using the issue tracker.
Credits
- Maksa988
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-filters with dependencies
illuminate/support Version >=5.3
illuminate/database Version >=5.3
illuminate/http Version >=5.3
illuminate/console Version >=5.3