Answers for "how to user current route for class in laravel"

PHP
1

laravel route is current route

Route::currentRouteName()
Route::getCurrentRoute()->getPath();
Request::route()->getName()
Route::currentRouteName(); //use IlluminateSupportFacadesRoute;
Route::getCurrentRoute()->getActionName();
$uri = $request->path();
Posted by: Guest on December-05-2021
1

get current route laravel

get URL:
{{ Request::url() }} // http://localhost/path

get path:
{{ Request::path() }} // path
Posted by: Guest on August-23-2021
1

laravel route is current route

Route::currentRouteName() == 'my_route_name'
Posted by: Guest on December-05-2021

Code answers related to "how to user current route for class in laravel"

Browse Popular Code Answers by Language