ramomen / laravel-make-class
php artisan make class for Laravel 5+
dev-main
2022-09-21 09:26 UTC
Requires
- php: ^7.1|^8.0
- illuminate/console: ~5.6.34|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0
- illuminate/support: ~5.6.34|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-10-21 13:50:09 UTC
README
create a class command for Laravel 5+ 😋 Create a new class and service interface
requires
php: ^7.1|^8.0 illuminate/console: ~5.6.34|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0 illuminate/support: ~5.6.34|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0
requires (dev)
phpunit/phpunit: ^9.5
Install
composer require ramomen/laravel-make-class --dev
Suggest
🤔 Usage
$ php artisan make:class {name : Create a class} {--i : Optional of create a class interface}
Example
Create a class
🐪
$ php artisan make:class UpperCamelClass
<?php // app/Http/Classes/UpperCamelClass.php namespace App\Classes; /** * Class UpperCamelClass * @package App\Classes */ class UserClass { }
+ Optional service interface
v1.0.x -> contract
v1.1.x -> interface
$ php artisan make:class UpperCamelInterface --i
<?php // app/Http/Classes/Contracts/UpperCamelInterface.php namespace App\Classes\Interfaces; /** * Interface UpperCamelInterface * @package App\Classes\Interfaces */ interface UpperCamelInterface { }