Download the PHP package arielmejiadev/laravel-query-class without Composer
On this page you can find all versions of the php package arielmejiadev/laravel-query-class. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download arielmejiadev/laravel-query-class
More information about arielmejiadev/laravel-query-class
Files in arielmejiadev/laravel-query-class
Package laravel-query-class
Short Description it creates query classes to handle easily requests with multiple filters, sorts and includes.
License MIT
Homepage https://github.com/arielmejiadev/laravel-query-class
Informations about the package laravel-query-class
Laravel query class
It generates query classes to handle requests with multiple filters, sorts and includes.
The idea comes as a tip from a LaraconUS 2019 talk from Freek Van der Herten
Installation
You can install the package via composer:
Stubs & Commands installation
Usage
It would generate a class in app/Http/Queries/Users/UserQuery.php
:
You can choose if your query class would extend from Spatie Query Builder
(REST API STANDARD) of from an Eloquent
query class (for custom cases).
You can chain any Eloquent method or if you choose Spatie Query Builder methods from both tools.
Now you can inject the Query Class in any controller constructor and the Laravel container will resolve it by itself.
Testing
Changelog
Please see CHANGELOG for more information 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
- Ariel Mejia Dev
- Freek Van der Herten
- All Contributors
License
The MIT License (MIT). Please see License File for more information.