phpone / laravel-annontation-route
There is no license information available for the latest version (1.0.0) of this package.
generate laravel annotation route
1.0.0
2021-01-12 12:04 UTC
Requires
- php: ~7.4|~8.0
- doctrine/annotations: ^1.11
- illuminate/console: ^8.0
- illuminate/support: ^8.0
- roave/better-reflection: ^4.12
Requires (Dev)
- phpunit/phpunit: ^9.5
README
laravel application generate route file by annotation
Installation
composer require phpone/laravel-annontation-route
Usage
- add RouteAnnotationProviders to config/app.php
<?php return [ 'providers' => [ //.......other serviceProvider \PhpOne\LaravelAnnotation\Providers\RouteAnnotationProviders::class, ] ];
- generate route file by command
php artisan annotation-route:generate
this function will scan Annotations of Controller dir , and wirte into api.php the file like this
<?php Route::post("api/user/login","UserController@login"); Route::get("api/company/info","CompanyController@info");
Annotations list
- @Controller
- @Mapping
- @PostMapping
- @GetMapping
- @Group