innovareti/laravel-aux is a Laravel package.
It currently has 1 GitHub stars and 10.810 downloads on Packagist (latest version v4.1).
Install it with composer require innovareti/laravel-aux.
Discover more Laravel packages by innovareti
or browse all Laravel packages to compare alternatives.
Last updated
Pacote que tem como intuito auxiliar na padronização e criação de um CRUD de uma API (Laravel) que segue o padrão (View -> Controller -> Service -> Repository -> Model)
Examples of usage:
List all elements:
Paginated:
http://localhost:8000/api/v1/users
Whithout pagination:
http://localhost:8000/api/v1/users?paginated=false
Order:
Asc:
http://localhost:8000/api/v1/users?orderByAsc[]=name
Desc:
http://localhost:8000/api/v1/users?orderByDesc[]=id
Get element by id
http://localhost:8000/api/v1/users?id=1
Bring with relationships
http://localhost:8000/api/v1/users?with[]=company
Filter by any field, including children fields
Filtering by parent fields -> will bring all which name matches input 'name' (Ma), like Mateus, Maicon, Marcos
http://localhost:8000/api/v1/users?name=Ma
Filtering by children -> will bring all which relation (companies) matches input 'name' (hospital) from companies table
http://localhost:8000/api/v1/users?with[]=company&name=Mat&company[name]=hospital
Group by any field -> will bring data grouped by the value of field (company_id)
http://localhost:8000/api/v1/users?with[]=company&groupBy[]=company_id
Para testar tem que instalar
sudo apt-get install php-sqlite3
composer dump-autoload