Laravel Get Current URL with Parameters Example

Laravel get current url with parameters example; Through this tutorial, i am going to show you how to get current url and it’s parameters on route, controller and blade view in laravel apps.

Use the below give a function to get current URL without the query string:

echo \Request::url();

Use global url function to get current url with parameters in laravel:

echo url()->url();

Use the current function:

echo url()->current();

Get current full URL with query string parameters:

echo url()->full();

To get current path of url in laravel apps:

 $request->path() 

Get last requested or previous URL in laravel apps:

echo url()->previous();

Recommended Laravel Tutorials

Leave a Comment