8891 / laravel-route-json
Export laravel registered routes to specify json file
Installs: 1 371
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:laravel-command
Requires
- php: >=5.4
- illuminate/support: ^5.0
README
Export all route into a json file (route.json) at public path
route.json format like
[
"path" : "/user",
"path" : "/user/[^/]+" # equal route /user/{id}
]
Support Laravel & Lumen upper 5.0
Usage
composer require 8891/laravel-route-json
Laravel
config/app.php
'providers' => [ ... 'T8891\RouteJson\RouteJsonServiceProvider', ]
Lumen
bootstrap/app.php
$app->register(T8891\RouteJson\RouteJsonServiceProvider::class); // OR $app->register('T8891\RouteJson\RouteJsonServiceProvider');
Export route.json
php artisan route:json
then check the public/route.json
Extra Route Match
config/routejson.php
<?php return [ "extra" => [ "/assets" ] ];