Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel get current route name

Route::currentRouteName()
Comment

laravel get current route name

request()->route()->getName()
Comment

get current route laravel

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

get path:
{{ Request::path() }} // path
Comment

laravel route is current route

Route::currentRouteName()
Route::getCurrentRoute()->getPath();
Request::route()->getName()
Route::currentRouteName(); //use IlluminateSupportFacadesRoute;
Route::getCurrentRoute()->getActionName();
$uri = $request->path();
Comment

get current route in blade laravel

Get the current url

here using the Request::url() method. It will return the entire URL, but strip the query string from it.

<p> Url: {{  Request::url() }} </p>
Output

Url: http://localhost:8000/post/demo
Comment

get current route in blade laravel

<p> Path: {{ Request::path() }} </p>
Comment

current url route laravel

Route::current()
############### OR ####################
$request->getRequestUri()
Comment

laravel get current route name

Route::getCurrentRoute()->getActionName();
Comment

laravel route Accessing The Current Route

$route = Route::current();

$name = Route::currentRouteName();

$action = Route::currentRouteAction();
Comment

laravel get current route url

@if(Request::url() === 'your url here')
    // code
@endif
Comment

laravel route is current route

Route::currentRouteName() == 'my_route_name'
Comment

laravel get current route url

if (Request::is('admin/*'))
{
    // code
}
Comment

get current route in blade laravel

Path: post/demo
Comment

PREVIOUS NEXT
Code Example
Php :: publish config laravel 
Php :: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) 
Php :: require all files in directory php 
Php :: php echo alot of html 
Php :: is users logged in laravel blade 
Php :: how to truncate the given string to the specified length in blade.php 
Php :: how to create new project in laravel 
Php :: how to compare two versions in php 
Php :: eliminar ultimo caracter string php 
Php :: loop object property laravel 
Php :: laravel get url path 
Php :: pagination prestashop 1.7 
Php :: http error code php 
Php :: the action you have requested is not allowed. in codeigniter 
Php :: how to add script in WordPress admin page 
Php :: round numnero php 
Php :: fetch row in php 
Php :: laravel model create array 
Php :: laravel migrate seed 
Php :: multiply a string php 
Php :: php array all keys empty 
Php :: smtp php test 
Php :: laravel with where has 
Php :: php add to array in loop 
Php :: To find out where your php.ini is located 
Php :: how to know the path of php in linux 
Php :: php token generator 
Php :: linux delete php sessions 
Php :: php microtime to seconds 
Php :: php get current month first date 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =