I want to show all the routes list that i created in web.php file.
Because i want to give permissions to user based on this routes.
How can i get this route lists ?
Please help me on this.
I am using this code , but this code is not giving me my registered routes.
use Illuminate\Support\Facades\Route;
$routeCollection = Route::getRoutes();
Thank you for reply.
My controller is in admin folder and i am getting this error
Class 'App\Http\Controllers\admin\Illuminate\Support\Facades\Route' not found
@Dhruv Sompura Check the RouteServiceProvider and you'll see how the routes are being initialized. So do the same and you should be able to list them all.