Request::route() laravel get name code example
Example 1: laravel is route name
// Check if route is ***
Request::route()->named("YourRouteNameView")
Example 2: laravel get route
Route::get('foo', function () {
return 'Hello World';
});
// Check if route is ***
Request::route()->named("YourRouteNameView")
Route::get('foo', function () {
return 'Hello World';
});