Laravel - How to get current URL in controller or view?By Hardik Savani | July 20, 2016 | | 17886 Viewer | Category : Laravel
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 select concat columns with Laravel Query Builder?
- How to check word exist in string or not in PHP?
- Bootstrap progress bar animate example using bootstrap-progressbar.js
- How can i get the path from laravel application root?
- Laravel - How to disable created_at and updated_at timestamps from Model?
- How to set vertical align middle div by CSS in HTML?
- Example of trigger on after delete with update query mysql