How to Get Current URL with Parameters in Laravel?
We sometimes require to get full url path with query string parameters that way we can perform on it. So we can get current url with also all parameter using several method of laravel 6, laravel 7, laravel 8 and laravel 9.
There are several option to get full url with query string as listed bellow:
- URL Facade
- Request Facade
- $request Object
I give you three way to get full path with parameters, so you can see as bellow:
Example 1:
public function index()
{
$fullURL = \URL::full();
print_r($fullURL);
}
Example 2:
public function index()
{
$fullURL = \Request::fullUrl();
print_r($fullURL);
}
Example 3:
public function index(Request $request)
{
$fullURL = $request->fullUrl();
print_r($fullURL);
}
I hope it can help you...

Hardik Savani
I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.