Laravel: How to Get Current Route Name? (v5 … v7)

In Laravel v4 I was able to get the current route name using… Route::currentRouteName() How can I do it in Laravel v5 and Laravel v6? 32 Answers 32 Try this Route::getCurrentRoute()->getPath(); or \Request::route()->getName() from v5.1 use Illuminate\Support\Facades\Route; $currentPath= Route::getFacadeRoot()->current()->uri(); Laravel v5.2 Route::currentRouteName(); //use Illuminate\Support\Facades\Route; Or if you need the action name Route::getCurrentRoute()->getActionName(); Laravel 5.2 route … Read more