jakubkratina / lumen-dingo-route-list by jakub.kratina

Route:list command support at Lumen framework application with Dingo API framework
30,413
3
1
Package Data
Maintainer Username: jakub.kratina
Maintainer Contact: me@jakubkratina.cz (Jakub Kratina)
Package Create Date: 2016-05-18
Package Last Update: 2019-10-30
Language: PHP
License: MIT
Last Refreshed: 2024-11-30 15:11:49
Package Statistics
Total Downloads: 30,413
Monthly Downloads: 12
Daily Downloads: 0
Total Stars: 3
Total Watchers: 1
Total Forks: 2
Total Open Issues: 1

lumen-dingo-route-list

Route:list command support at Lumen framework application with Dingo API framework

Installation

Install via composer:

composer require jakubkratina/lumen-dingo-route-list

Just register the command inside $commands array at app/Console/Kernel.php file:

protected $commands = [
	JK\Dingo\Api\Console\Commands\RouteListCommand::class
];

Run

Open your terminal and type artisan route:list to see output like:

+---------+
| Version |
+---------+
| v1      |
+---------+
+------------+---------------------------+------------------+-----------------------------------------------+-----------------+
| Method     | URI                       | Name             | Action                                        | Middleware      |
+------------+---------------------------+------------------+-----------------------------------------------+-----------------+
| GET | HEAD | api/albums                | albums.index     | App\Http\Controllers\AlbumController@index    | api.controllers |
| GET | HEAD | api/categories            | categories.index | App\Http\Controllers\CategoryController@index | api.controllers |
| GET | HEAD | api/properties            | properties.index | App\Http\Controllers\PropertyController@index | api.controllers |
| GET | HEAD | api/albums/{album}        | albums.show      | App\Http\Controllers\AlbumController@show     | api.controllers |
| GET | HEAD | api/groups/{group}        | groups.show      | App\Http\Controllers\GroupController@show     | api.controllers |
| GET | HEAD | api/properties/{property} | properties.show  | App\Http\Controllers\PropertyController@show  | api.controllers |
+------------+---------------------------+------------------+-----------------------------------------------+-----------------+
+---------+
| Version |
+---------+
| v2      |
+---------+
+------------+---------+------+---------+-----------------+
| Method     | URI     | Name | Action  | Middleware      |
+------------+---------+------+---------+-----------------+
| GET | HEAD | api/foo |      | Closure | api.controllers |
+------------+---------+------+---------+-----------------+

Version argument

You can also specify your API version: artisan route:list v2.

+------------+---------+------+---------+-----------------+
| Method     | URI     | Name | Action  | Middleware      |
+------------+---------+------+---------+-----------------+
| GET | HEAD | api/foo |      | Closure | api.controllers |
+------------+---------+------+---------+-----------------+