widnyana / lumen-dingo-routes-list
Lumen Routes List Dingo API Endpoint
Installs: 1 578
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=5.5.9
- dingo/api: 1.0.x@dev
- illuminate/support: ~5.0
This package is not auto-updated.
Last update: 2024-11-19 22:30:03 UTC
README
This code bring Dingo's api:route
command to Lumen's artisan
.
Howto
Acquire the source code:
composer require widnyana/lumen-dingo-routes-list
and Register the service provider:
// file: bootstrap/app.php
$app->register(Widnyana\LDRoutesList\CommandServiceProvider::class);
call it like this:
$ ./artisan api:list-route
for avoiding any command conflict with Dingo nor Lumen, the command is located at api:list-route
.
Help wanted
There is an "undefined behaviour" that I can't exactly tell you why it will always say GET|HEAD
for the Method
columns no matter what HTTP Method you define for each route, as far as I try, there is no HTTP Method passed down to Dingo\Api\Routing\Route
, and the function call to $route->getMethods()
will always return GET|HEAD
. If you know how, please send me a pull request :)
Disclaimer
This code is blatantly stolen from this file.
License
see license