Answers for "see the current route from the controller in laravel"

PHP
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()
Route::getCurrentRoute()->getPath();
\Request::route()->getName()
Route::currentRouteName(); //use Illuminate\Support\Facades\Route;
Route::getCurrentRoute()->getActionName();
$uri = $request->path();
Posted by: Guest on December-05-2021

Code answers related to "see the current route from the controller in laravel"

Browse Popular Code Answers by Language