Download the PHP package worksofallen/laravel-api-scaffold without Composer
On this page you can find all versions of the php package worksofallen/laravel-api-scaffold. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download worksofallen/laravel-api-scaffold
More information about worksofallen/laravel-api-scaffold
Files in worksofallen/laravel-api-scaffold
Package laravel-api-scaffold
Short Description A simple way to send batch emails
License MIT
Homepage https://github.com/worksofallen/laravel-api-scaffold
Informations about the package laravel-api-scaffold
A Laravel Artisan command to quickly scaffold a complete RESTful API resource, including:
- Eloquent Model with SoftDeletes & fillable setup
- Migration file with a
name
column and soft deletes support - API Controller with basic CRUD operations & pagination, filtering, sorting
- Form Request classes for validation with proper JSON error responses
Installation
Require the package via Composer:
Publish the command if necessary (depends on how you package it).
Usage
Run the custom Artisan command to generate a full API scaffold for a resource:
Replace {name}
with the singular model name, e.g., Product
, Category
, etc.
What gets created?
app/Models/{Name}.php
— Model with fillablename
attribute and soft deletes.database/migrations/xxxx_xx_xx_xxxxxx_create_{snake_plural}_table.php
— Migration withname
and soft deletes columns.app/Http/Requests/{Name}StoreRequest.php
— Validation request for storing.app/Http/Requests/{Name}UpdateRequest.php
— Validation request for updating.app/Http/Controllers/API/{Name}Controller.php
— API controller with:index
method supporting search (q
), sort (sortField
,sortOrder
), and pagination (sizePerPage
).store
,show
,update
,destroy
methods.
Features
- Standardized API scaffolding reduces repetitive boilerplate code.
- Soft deletes enabled by default.
- Search, sort, paginate support out of the box.
- JSON validation error responses for API-friendly error handling.
- Clean, maintainable, and easy to customize generated code.
Example
Generates Product
API scaffolding:
- Model:
app/Models/Product.php
- Migration:
database/migrations/xxxx_xx_xx_create_products_table.php
- Requests:
ProductStoreRequest
,ProductUpdateRequest
- Controller:
app/Http/Controllers/API/ProductController.php
Authors
Changelog
Please see CHANGELOG for more information what has changed recently.
Security
Please review our security policy on how to report security vulnerabilities.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-api-scaffold with dependencies
ext-json Version *
illuminate/contracts Version ^8.0 || ^9.0 || ^10.0 || ^11.0
spatie/laravel-package-tools Version ^1.12