laravel get current route name before route registration code example
Example 1: laravel route match
Route::match(['get', 'post'], '/', function () {
//
});
Route::any('/', function () {
//
});
Example 2: set route name laravel
Route::get('/novanoticia', 'HomeController@getNovaNoticia')->name('route_name');