This is a simple package used to add more make:*
commands.
Right now, it adds these commands:
- make:interface
- make:service
- make:trait
All files generated by the commands are stored in App/Type
, so for example, trait files are stored in App/Traits
with the same namespace.
You should install this as a dev dependency:
composer require djlimix/laravel-extended-commands --dev
php artisan make:interface InterfaceName
This generates a file called InterfaceName.php
with the namespace of App\Interfaces
inside the folder app\Interfaces
.
php artisan make:service ServiceName
This generates a file called ServiceName.php
with the namespace of App\Services
inside the folder app\Services
.
php artisan make:trait TraitName
This generates a file called TraitName.php
with the namespace of App\Traits
inside the folder app\Traits
.
Using a slash in the name of interface/service/trait creates the file in a subfolder, for example:
php artisan make:trait User/CreateUserTrait
creates a trait named CreateUserTrail
inside the folder app\Traits\User
with the namespace of app\Traits\User
This package requires Laravel 8 or higher.
Contributing is always welcome.