Looking to hire Laravel developers? Try LaraJobs

laravel-routing-utilities maintained by ennetech

Description
This package allows you to work faster and better with laravel routes
Author
Last update
2020/11/30 10:10 (dev-main)
License
Links
Downloads
7

Comments
comments powered by Disqus

laravel-routing-utilities

Defining routes is a little bit tricky once the number of endpoints grow up, why not emulate symfony method for declaring routes in laravel?

Usage:

  • install the package with composer require ennetech/laravel-routing-utilities
  • autoload a namespace in RouteServiceProvider like this:
        Route::prefix('api/v1')
            ->middleware('api')
            ->group(function () {
                RouteAutoloader::loadNamespace('App\Http\Controllers\Api\v1');
            });
  • annotate the methods (method and path are mandatory):
    /**
     * @method GET
     * @path /
     * @where id=[0-9]+
     * @middleware throttle
     * @name example
     */

Missing docs:

  • Resource controller autoloading
  • Auto documentation

LICENSE

MIT