maslennikov-yv / action-generator
Installs: 378
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/maslennikov-yv/action-generator
Requires
- php: ^8.1
- illuminate/console: ^10.0|^11.0|^12.0
- illuminate/support: ^10.0|^11.0|^12.0
- spatie/laravel-data: ^4.11
README
Actions - lightweight business logic layer
Installation
You can install the package via composer:
composer require maslennikov-yv/action-generator --dev
Publish
You can publish action config:
php artisan vendor:publish --tag=action-config
Also, you can publish action stubs:
php artisan action:stub:publish
Usage
When you need to create an action, just run the following command:
php artisan make:action VerbModel --test --force
or, to make CreateModel, IndexModel, ShowModel, UpdateModel, DestroyModel actions:
php artisan make:action {*}Model --test --force
For example:
php artisan make:action GetArticle --test
or:
php artisan make:action {*}Article --test
If you plan to use the --test option, you must install pest: https://pestphp.com/docs/installation