Download the PHP package martink/apigenerator without Composer
On this page you can find all versions of the php package martink/apigenerator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download martink/apigenerator
More information about martink/apigenerator
Files in martink/apigenerator
Package apigenerator
Short Description A Laravel package to generate CRUD and API resources.
License MIT
Informations about the package apigenerator
ApiGenerator
ApiGenerator is a Laravel package that helps you generate a full CRUD stack (Model, Migration, Controller, Requests, Resource, Service, and API routes) and API scaffolding with a single Artisan command.
๐ Installation
You can install the package via Composer:
If Laravel doesn't auto-discover the service provider, add it manually in config/app.php:
๐ฆ Publish (if needed)
โ๏ธ Usage Generate a Full CRUD Stack
This will generate:
app/Models/ModelName.php
database/migrations/xxxx_xx_xx_create_modelname_table.php
app/Http/Controllers/Api/ModelNameController.php
app/Http/Requests/ModelNameStoreRequest.php
app/Http/Requests/ModelNameUpdateRequest.php
app/Http/Resources/ModelNameResource.php
app/Services/ModelNameService.php
Route entry in routes/api.php
Generate API from Existing Models If your model already exists and includes $fillable, you can use:
This command will loop through all models in app/Models and auto-generate:
Controllers
Resources
Services
Routes
๐งช Example
๐ Generated Controller Example
โ Requirements PHP ^7.4|^8.0
Laravel 8 or 9+
License
This package is open-sourced software licensed under the MIT license.
Developed by Martin Karadzinov
All versions of apigenerator with dependencies
illuminate/support Version ^10.0|^12.0
illuminate/database Version ^10.0|^12.0