azizizaidi/laravel-all-in-one-command
Scaffold a complete Laravel feature with one artisan command. Interactively generate CRUD essentials: model, migration, factory, seeder, controllers, form requests, services (optional interface), policies, web/API routes, tests, scheduled command, and Blade views.
A Laravel package that generates all necessary files for a feature with a single command. This package helps you quickly scaffold complete CRUD functionality including models, migrations, controllers, form requests, services, tests, policies, routes, and views.
You can install the package via composer:
composer require azizizaidi/laravel-all-in-one-command --dev
The package will automatically register itself via Laravel's package discovery.
Generate a complete feature with the interactive command:
php artisan make:feature Order
This will prompt you to choose which components to generate:
When you run php artisan make:feature Order, the command will generate:
app/Models/Order.php
database/migrations/2024_01_01_000000_create_orders_table.php
database/factories/OrderFactory.php
database/seeders/OrderSeeder.php
app/Http/Controllers/OrderController.php
app/Http/Requests/StoreOrderRequest.php
app/Http/Requests/UpdateOrderRequest.php
app/Services/OrderService.php
app/Services/Contracts/OrderServiceInterface.php
app/Policies/OrderPolicy.php
tests/Unit/OrderTest.php
tests/Feature/OrderTest.php
resources/views/orders/index.blade.php
resources/views/orders/create.blade.php
resources/views/orders/edit.blade.php
resources/views/orders/show.blade.php
You can specify custom controller namespaces:
php artisan make:feature Shop/Product
This will create controllers in App\Http\Controllers\Shop\ namespace.
Models: Basic Eloquent model with HasFactory trait Migrations: Standard Laravel migration with proper table naming Controllers: Resource, Invokable, or Basic controllers with proper model binding Form Requests: Store and Update request classes with basic validation structure Services: Service classes with optional interfaces and automatic binding Tests: PHPUnit test classes with basic test structure Policies: Model policies with standard CRUD methods Views: Basic Blade templates with Bootstrap-friendly markup Routes: Automatic route registration in web.php and/or api.php
The package works out of the box with sensible defaults, but you can customize:
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email azizikuis@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
How can I help you explore Laravel packages today?