Posted inLaravel / php

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.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype