Laravel 9 Get Current Route Name Example


Share:
 | Published By: Admin | Published On: Jul 15, 2022 | Category: Laravel 9 Laravel

This article will provide some of the most important example laravel get route name. I explained simply about laravel 9 get current route. if you want to see an example of laravel get the route name from the URL then you are in the right place. it's a simple example of laravel get a route name from URL.

Let's start following example.

Using Request:
$routeName = Request::route()->getName());
print($routeName);
Using Route:
$routeName = Route::getCurrentRoute()->getPath();
print($routeName);
It will help you...
Share: