dimanche 28 février 2016

How do I get a list of routes from a module/directory in Laravel 5?

I have 3 modules in app folder such as: User Module , Role Module and Permission Module. Also I have different route.php file in each and every module. Now I need to get a route list from User Module.

I got a complete list from all modules using this code:

    $routeCollection =Route::getRoutes();  
    foreach ($routeCollection as $value) {
        echo $value->getPath()."<br>";
    }

Instead of all routes, I want to get a list of routes from a specific module or a specific directory as User Module.

How do I get a list of routes for a specific folder/module/file ? Thanks in Advanced.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1LpcQTn
via IFTTT

Aucun commentaire:

Enregistrer un commentaire