Laravel - How to get current URL in controller or view?By Hardik Savani | July 20, 2016 | | 2358 Viewer | Category : Laravel
Share this post:
We always require to get current URL path when work on ajax pagination or something, at that we require to get current page URL on Controller or blade file. So, you can get current url easily.
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:
$currentURL = URL::current();
- How to upgrade node.js version in Ubuntu?
- How to disable model timestamps in Laravel 5.3?
- Laravel 5 generate sitemap using roumen/sitemap package Example
- How to insert multiple records in Laravel 5?
- Laravel 5.3 - How to create SEO friendly sluggable URL
- Laravel 5 - line chart example code using google charts API
- PHP - import excel file into mysql database tutorial
- Laravel 5 Twitter OAuth using Socialite Package