erenav / makers
Custom Laravel make commands
1.0.5
2023-06-28 01:27 UTC
Requires
- php: ^8.2
- illuminate/contracts: ^10.0
- laravel/framework: ^9.0|^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
Suggests
- spatie/laravel-model-states: Needed only if using the makers:[state|state-implementation|state-transition] commands
README
Custom artisan make
commands for Laravel applications.
Installation
You can install the package via composer:
composer require erenav/makers --dev
You can publish the stubs with:
php artisan makers:publish-stubs
Use the --force
option to override previously published stubs.
You can publish the config file with:
php artisan vendor:publish --tag="makers-config"
Commands
php artisan makers:action {name} Create a new action class
php artisan makers:dto {name} {--readonly} {--factory} Create a new dto class
php artisan makers:enum {name} {--backed=} Create a new enum class
php artisan makers:generic-factory {name} {--import=} Create a new generic factory class
php artisan makers:macros {name} Create a new macro class
php artisan makers:pipe {name} Create a new pipe class
php artisan makers:state {name} {implementations?*} Create a new state classes
php artisan makers:state-implementation {name} {parent} Create a new state implementation classes
php artisan makers:state-transition {name} {model} Create a new state transition class
php artisan makers:value-object {name} {--cast} Create a new value object class (with an optional cast class)
Note
All commands have access to the --force
option. Including this option allows for the override of existing files.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.