Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/widnyana/lumen-dingo-route-list
Route:list command support at Lumen framework application with Dingo API framework
https://github.com/widnyana/lumen-dingo-route-list
Last synced: about 1 month ago
JSON representation
Route:list command support at Lumen framework application with Dingo API framework
- Host: GitHub
- URL: https://github.com/widnyana/lumen-dingo-route-list
- Owner: widnyana
- License: bsd-3-clause
- Created: 2016-07-03T15:47:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-24T08:49:46.000Z (over 8 years ago)
- Last Synced: 2024-12-18T19:27:57.165Z (about 1 month ago)
- Language: PHP
- Homepage: http://log.widnyana.web.id
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
Lumen Dingo Route List
======================[![Latest Stable Version](https://poser.pugx.org/widnyana/lumen-dingo-routes-list/v/stable)](https://packagist.org/packages/widnyana/lumen-dingo-routes-list) [![Monthly Downloads](https://poser.pugx.org/widnyana/lumen-dingo-routes-list/d/monthly)](https://packagist.org/packages/widnyana/lumen-dingo-routes-list)
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 `.![lumen-dingo-routes-list in action](http://i.imgur.com/ExAtLXW.png)
### 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](https://github.com/dingo/api/blob/master/src/Console/Command/Routes.php) file.#### License
see [license](LICENSE)