nicolasalexandre9 / handler-generator
handler generator for laravel
Installs: 8 812
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- darkaonline/l5-swagger: ^8.0
Requires (Dev)
- orchestra/testbench: ~3.4
- phpunit/phpunit: ~5.0
This package is auto-updated.
Last update: 2024-11-10 20:23:06 UTC
README
Installation
composer require 'nicolasalexandre9/handler-generator'
That's all, thanks Laravel auto discovery !
Requirements
- Laravel >=7
Configuration
publish assets
php artisan vendor:publish --provider="Nicolasalexandre9\HandlerGenerator\HandlerGeneratorProvider" --tag="config"
Set all informations for generate PHPDoc
category => '',
package => '',
author' => '',
license' => '',
link' => '',
Use
php artisan generate:handler model Namespace1 Namespace2
Warning => respect case like the example (model in lowercase and namespace capitalize)
This command will generate the next files (IF NOT EXIST):
- App\Models\Model.php
- App\Transformers\ModelTransformer.php
- App\Http\Requests\ModelRequest.php
- App\Http\Handlers\Core\ModelHandler.php
- App\Http\Handlers\Interfaces\ModelHandlerInterface.php
- App\Http\Controllers\Api\V1\AbstractModelsController.php
- App\Http\Controllers\Api\V1\Namespace1\ModelsController.php
- App\Http\Controllers\Api\V1\Namespace2\ModelsController.php
And update config\pattern.php for automatically binding new handler.