stackrats / laravel-scaffold-feature
Scaffold new feature directories & files from prompts
0.1.9
2025-05-11 07:11 UTC
Requires
- php: ^8.1
- illuminate/console: ^10.0|^11.0|^12.0
- illuminate/pagination: ^10.0|^11.0|^12.0
- illuminate/support: ^10.0|^11.0|^12.0
- laravel/prompts: ^0.1.9|^0.3.5
- spatie/laravel-data: ^4.0
Requires (Dev)
- laravel/pint: ^1.21
- orchestra/testbench: ^10.1
- pestphp/pest: ^3.7
README
A convenient Laravel package to scaffold structured feature directories and files interactively from Artisan command prompts.
Installation
Install via Composer:
composer require stackrats/laravel-scaffold-feature
Laravel automatically registers the service provider.
Usage
To scaffold a new feature, simply run:
php artisan scaffold:feature
You'll be prompted interactively for:
- Root directory (
App/Features
,App/Shared/Features
, orApp/
) - Optional subdirectory (e.g.,
KnowledgeBase
) - Feature name (PascalCase)
- API route method (
post
,get
,put
,delete
) - Additional options depending on the method
- Which directories/files to scaffold
After completing the prompts, your feature structure will be automatically created.
Publishing Templates
Optionally, you can publish the stub templates to customize them within your Laravel application:
php artisan vendor:publish --tag=laravel-scaffold-feature
The templates will be copied to:
resources/templates/vendor/laravel-scaffold-feature
Feel free to modify them according to your project's requirements.
License
This package is open-sourced software licensed under the MIT license.
Dev
Format files
./vendor/bin/pint
Run tests
./vendor/bin/pest