hisman / laravel-make-class
Artisan command for generating a new custom class in Laravel.
Installs: 12 090
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 1
Forks: 2
Open Issues: 1
Requires (Dev)
- mockery/mockery: ^1.2
- orchestra/testbench: ^3.7
- phpunit/phpunit: ^7.4
This package is auto-updated.
Last update: 2025-04-21 22:55:58 UTC
README
Artisan command for generating a new custom class in Laravel.
Installation
Install the package via composer:
composer require --dev hisman/laravel-make-class
If you're using Laravel < 5.5, you'll need to add the service provider to config/app.php
file:
'providers' => [ ... Hisman\MakeClass\MakeClassServiceProvider::class, ... ]
Usage
To create a new class, call the make:class
command from Artisan. Class will be created under the app
folder.
php artisan make:class ClassName
You can add the -c
or --constructor
option to generate new class with constructor.
php artisan make:class ClassName -c
php artisan make:class ClassName --constructor