Route::getRoutes()
returns a RouteCollection
. On each element, you can do a simple $route->getPath()
to get path of the current route.
Each protected parameter can be get with a standard getter.
Looping works like this:
$routeCollection = Illuminate\Support\Facades\Route::getRoutes();
foreach ($routeCollection as $value) {
echo $value->getPath();
}