define route name laravel code example
Example 1: laravel is route name
// Check if route is ***
Request::route()->named("YourRouteNameView")
Example 2: laravel route
# Using Request
Route::get('user/{name}', function (Request $request) {
return $request->route('name');
});