How to Get Current Full URL in Laravel 9?
https://www.itsolutionstuff.com/post/how-to-get-current-full-url-in-laravel-9example.html
Today, I would like to show you laravel 9 get current url in controller. This post will give you simple example of laravel 9 get current url in view. you will learn get current url in laravel 9. step by step explain laravel 9 get current url.
Laravel provide URL facade that way we can get current URL anywhere, as bellow you can see i use current() of URL facade. URL facade through you can get your current page url from every where. So you can check your current url this way:
Get Current URL in Laravel:
Example 1: current() with Helper
Example 2: full() with Helper(with query string parameters)
Example 3: current() with Facade
Example 4: full() with Facade(with query string parameters)
Example 5: using Request
Get Previous URL in Laravel:
Get Current Route in Laravel:
Read Also: How to Get Last Inserted Id in Laravel 9?
I hope it can help you....
Last updated