Laravel API Toolkit supercharges your API advancement with standard feedbacks, vibrant pagination, as well as a lot more. At the time of creating, it sustains the complying with attributes:
- Schema assistance
- Pagination assistants
- API Generator Command
- API filtering system
- Activities
- Media assistants
- As Well As a lot more …
Making use of the offered api: produce
Artisan command, you can conveniently produce all the vital data required, consisting of controller, demands, sources, versions, movements, and so on:
php craftsmen api: produce Consumer
"username: string|age: integer: nullable|company_id: foreignId|standing: enum( brand-new, old)"
-- all
After running the above command, the complying with data are produced, providing you every little thing you require to begin developing the Consumer API:
Filtering is an additional helpful attribute in this plan, providing you the capability to specify which areas you can filter on. Offered the instance of a Cars And Truck
version, right here’s what your filter arrangement may appear like:
namespace AppModels;
usage EssaAPIToolKitFiltersFilterable;
course Cars And Truck prolongs Design
{
usage Filterable;
shielded string $default_filters = CarFilters:: course;
// Various other version code ...
}
As Well As the CarFilters
course may appear like:
namespace AppFilters;
usage EssaAPIToolKitFiltersQueryFilters;
course CarFilters prolongs QueryFilters
{
shielded variety $allowedFilters = ['color', 'model_id'];
shielded variety $columnSearch = [];
}
// OBTAIN/ cars?color= red
Activities is an additional attribute that you can utilize in this plan to envelop organization reasoning within distinctive courses that you can utilize to make up
namespace AppActions;
course CreateCar
{
public feature implement($ information)
{
// ...
}
}
// use instance in a controller
public feature shop( Demand $demand)
{
$ this->> createCar->> implement($ demand->> all());
}
To start with this plan, have a look at the paperwork at laravelapitoolkit.com You can discover more concerning this plan, obtain complete installment directions, as well as see the resource code on GitHub.