Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel get current route name

Route::currentRouteName()
Comment

laravel get current route name

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

how to get current url path in laravel

// Full URL with query string
print $request->fullUrl(); // http://127.0.0.1:8000/sometext?city=hyd

// Get the path part of the URL 
print $request->path(); // sometext

// Root (protocol and domain) part of the URL)
print $request->root(); //http://127.0.0.1:8000

//Get the full URL for the previous request
print url()->previous();

//tested on Laravel 5.6

//OR 

use IlluminateSupportFacadesURL;
 
print URL::current();
Comment

get current route laravel

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

get path:
{{ Request::path() }} // 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

How to get current url in laravel

//get current url
use IlluminateSupportFacadesRoute;
Route::getFacadeRoot()->current()->uri();
//get current full url
$url = url()->current();
Comment

laravel get current route name

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

laravel current url

use IlluminateSupportFacadesURL;
 
echo URL::current();
Comment

laravel get current route url

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

laravel get route path uri

Route::getFacadeRoot()->current()->uri();
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 :: Delete quotes in php 
Php :: add bootstrap class to checkout fields woocommerce 
Php :: notify multiple users laravel 
Php :: double where condition in laravel 
Php :: laravel joins eloquent model 
Php :: convert std to array php 
Php :: laravel wheredate 
Php :: array_filter first element php 
Php :: wordpress disable block styles 
Php :: check request header laravel 
Php :: foreach loop in laravel 
Php :: laravel where not equal 
Php :: import local js file laravel 
Php :: php concat objects 
Php :: difference between use and require in php 
Php :: spatie laravel activity log 
Php :: wordpress image size name 
Php :: laravel collection merge 
Php :: php decode json object 
Php :: how to loop with while in php for array associative 
Php :: php array pop by value 
Php :: add custom post type wordpress 
Php :: html to pdf in php 
Php :: location php ini mac os 
Php :: mysql get number of rows php 
Php :: has password argon2i 
Php :: laravel validation not equal to 
Php :: how condition for multiple row by orwhere laravel 
Php :: how to send mail in laravel 
Php :: apache using wrong php version 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =