erenav/makers

Custom Laravel make commands

1.0.5 2023-06-28 01:27 UTC

This package is auto-updated.

Last update: 2024-04-28 03:20:09 UTC


README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

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.