efati / laravel-scaffolder
Laravel package for generating complete feature stacks with repositories, services, DTOs, actions, policies, API resources, tests, and OpenAPI documentation.
Requires
- php: ^8.1
- laravel/framework: >=10.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-19 08:19:27 UTC
README
A Laravel package for generating complete, production-friendly feature stacks from a single Artisan command.
Instead of manually creating the same repositories, services, DTOs, actions, policies, controllers, requests, resources, providers, tests, and API documentation for every feature, Laravel Scaffolder generates the structure for you with configurable options.
What It Generates
Depending on the selected options, the package can generate:
- Repositories and repository contracts
- Services and service contracts
- DTOs
- CRUD actions
- Policies
- Controllers
- Form requests
- API resources
- Service providers and bindings
- Feature tests
- OpenAPI / Swagger documentation
Installation
composer require efati/laravel-scaffolder
Laravel package discovery registers the service provider automatically.
Quick Start
Create a model and generate a complete module:
php artisan make:model Product -m php artisan make:module Product --all
Generate an API-oriented stack:
php artisan make:module Product --api
Generate directly from inline schema metadata:
php artisan make:module Product --api \
--fields="name:string:unique,price:decimal(10,2),is_active:boolean"
Generated code follows a layered structure built around repositories, services, DTOs, actions, requests, resources, policies, and providers.
Compatibility
| Requirement | Supported |
|---|---|
| PHP | 8.1 – 8.5 |
| Laravel | 10 – 13 |
| Composer | 2.x |
Documentation
The Laravel Scaffolder website includes a product overview and documentation for command options, examples, configuration, Swagger/OpenAPI, Jalali date support, testing, customization and troubleshooting.
- English: https://afshinefati.github.io/Laravel-Scaffolder-site/#/en/introduction
- فارسی: https://afshinefati.github.io/Laravel-Scaffolder-site/#/fa/introduction
Typical Generated Structure
app/
├── Actions/
├── DTOs/
├── Docs/
├── Http/
│ ├── Controllers/
│ ├── Requests/
│ └── Resources/
├── Policies/
├── Providers/
├── Repositories/
│ ├── Contracts/
│ └── Eloquent/
└── Services/
└── Contracts/
Testing
composer test
Why This Package Exists
Laravel applications often repeat the same architectural setup for every new feature. This package turns that repetitive work into a consistent, configurable generation workflow while keeping the generated code explicit and editable inside the application.
License
Laravel Scaffolder is open-source software licensed under the MIT License.