xxxxxxxxxx
// Check if route is ***
Request::route()->named("YourRouteNameView")
xxxxxxxxxx
// Get Current Route Name
Route::currentRouteName();
Request::route()->getName()
//Get Current Route's Action name
Route::getCurrentRoute()->getActionName();
//Get Current Route's URI
$uri = $request->path();
Route::getCurrentRoute()->getPath();
xxxxxxxxxx
WEB.PHP
Route::get('/', function () { return view('home'); })->name('home');
BLADE.PHP
<a href="{{ url("/") }}">home</a>
<a href="{{ route('home') }}">home</a>
// Like the post if you found it usefull and help other devs to find the good answer
xxxxxxxxxx
//Route::currentRouteName() // check
Route::get('/users',function(){
print "Execute";
});
xxxxxxxxxx
Route::get('/', [ControllerName::class, 'index'])->name('homeRoute');
xxxxxxxxxx
Route::get('/novanoticia', 'HomeController@getNovaNoticia')->name('route_name');
Route::get('/novanoticia', ['as' => 'route_name', 'uses' => 'HomeController@getNovaNoticia']);