Skip to content

A simple package used to add more make:* commands.

License

Notifications You must be signed in to change notification settings

djlimix/laravel-extended-commands

Repository files navigation

Laravel Extended Commands

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.

Installation

You should install this as a dev dependency:

composer require djlimix/laravel-extended-commands --dev

Command structure

Making an interface

php artisan make:interface InterfaceName

This generates a file called InterfaceName.php with the namespace of App\Interfaces inside the folder app\Interfaces.

Making a service

php artisan make:service ServiceName

This generates a file called ServiceName.php with the namespace of App\Services inside the folder app\Services.

Making a trait

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

Requirements

This package requires Laravel 8 or higher.

Contributing

Contributing is always welcome.

About

A simple package used to add more make:* commands.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages