Laravel - How to get current URL in controller or view?By Hardik Savani | July 20, 2016 | | 1708 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 create custom helper in Laravel 5?
- AngularJS tooltip using UI Bootstrap tpls HTML example with demo
- Crop, Resize, Frames etc on selected image in php using Aviary
- How to solve - you dont have permission to upload files in KCFinder ?
- Jquery Select2 - Select box with search example code
- Laravel 5 - Image Upload and Resize Example using Intervention Image Package
- Laravel 5 custom pagination view example
- Response download with file in Laravel 5.3 example