Extended Artisan Commands
Have you ever enjoyed the assistance of artisan commands? This package brings more of it :)
You can now generate PHP classes and traits using artisan
make:trait console commands.
Step 1: Install Through Composer
composer require stephenjude/extended-artisan-commands --dev
Step 2: Run Artisan!
You're all set. Run php artisan from the console, and you'll see the new commands in the make:* namespace section.
Creating A PHP Class
You can generate a class by calling the artisan
make:class command followed by the name of the class.
php artisan make:class Helper
Helper class will be generated under the
Creating A PHP Class With Namespace
php artisan make:class Services/EmailForwarderService
EmailForwarderService class will be generated under the
App/Services namespace and the directory will be automatically created if it does not exist.
Creating A PHP Trait
You can generate a trait by calling the artisan
make:trait command followed by the name of the trait.
php artisan make:trait FileUpload
By default, all traits are generated under the
App/Traits namespace and the directory will be automatically created if it does not exist.
Overriding Existing Class or Trait
To override an existing class or trait, you have to pass the
--force option to your console command.
php artisan make:class Services/EmailForwarderService --force php artisan make:trait FileUpload --force
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email firstname.lastname@example.org instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.