mattostromhall / laravel-make-in
A wrapper around the artisan make command to move created classes to a specified path and update the namespace accordingly.
Fund package maintenance!
mattostromhall
Requires
- php: ^8.0
- illuminate/contracts: ^v9.1
- spatie/laravel-package-tools: ^1.11
Requires (Dev)
- nunomaduro/collision: ^6.1
- nunomaduro/larastan: ^2.0
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.2
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-09-09 20:24:42 UTC
README
A wrapper around the artisan make command to move created classes to a specified path and update the namespace accordingly. This is not needed if you follow the default folder structure of a laravel project as the make command itself provides this in the name argument of the command.
However, if for instance you are following a Domain Driven approach, this saves you manually moving the files and updating namespaces after creation.
Installation
You can install the package via composer:
composer require --dev mattostromhall/laravel-make-in
Usage
The commands currently available are
php artisan make:command-in php artisan make:controller-in php artisan make:job-in php artisan make:mail-in php artisan make:model-in php artisan make:request-in
The base path and namespace for a command can be set through your .env file by adding the following, with values for the base path and namespace you'd like to use for the command:
PATH_BASE_{CLASS_NAME}=path/to/base/location NAMESPACE_BASE_{CLASS_NAME}=Base\Namespace\Here
Alternatively you can publish the config file and set the values you require there with:
php artisan vendor:publish --tag="laravel-make-in-config"
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.