laravel get current url with parameters – How to get current URL with parameters?

laravel get current url with parameters using \URL::current(), \Request::url(), \Request::fullUrl(), \Request::segment(3) and \URL::current() Examples.

laravel get current url with parameters

Laravel 7.x and 6.x Get Current URL with Parameters. We will show example of get current url with parameters in laravel 8

How to get current URL without query string in Laravel?

  return \URL::current();
           OR
  return \Request::url();

How to get current URL with query string in Laravel

return \Request::fullUrl();

How to get url parameters in Laravel?
www.domain.tld/Member/list?page=2

 $exampleTestURI = \Request::segment(3);

Don’t Miss : How To Get Current URL Or Path In Blade?

Get Current URL without Parameters:

Example

$exampleTestURI = \URL::current();

dd($exampleTestURI);

OR

$exampleTestURI = \Request::url();

dd($exampleTestURI);

I hope you get an idea about laravel get current url with parameters.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment