Download the PHP package chiariello/laravel-api-crud-maker without Composer
On this page you can find all versions of the php package chiariello/laravel-api-crud-maker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chiariello/laravel-api-crud-maker
More information about chiariello/laravel-api-crud-maker
Files in chiariello/laravel-api-crud-maker
Package laravel-api-crud-maker
Short Description Package to create an api CRUD with filters
License MIT
Homepage https://github.com/chiariello/laravel-api-crud-maker
Informations about the package laravel-api-crud-maker
Create API CRUD with filters
Create API CRUD with filters in Laravel project
Installation
Via composer:
Add FilterServiceProvider and RequestServiceProvider in config/app.php
Usage
Create new model with migration and controller:
Edit the migration as you want
Add HasFilters trait and fillables attributes in model
Extend CrudController and set $model attribute in Controller class
Create Filter class under app/Filters the class must have {ModelName}Filter.php name (in this example FlightFilters.php).
Now you need to set the filters array and insert every attribute filter and create a method for every filter.
create a form request with this name convention {{ModelName}}Request.php
Set validation and create and update logic.
add Route in api.php
Credits
All versions of laravel-api-crud-maker with dependencies
spatie/laravel-package-tools Version ^1.14.0
illuminate/contracts Version ^10.0