Laravel - How to get current URL in controller or view?By Hardik Savani | July 20, 2016 | | 21277 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();
- Laravel 5 - How to prevent browser back button after user logout?
- Laravel 5 - Simple CRUD Application Using ReactJS - Part 1
- How to add text on image in laravel 5?
- PHP - How to implement Google new reCAPTCHA Code Example with Demo?
- Bootstrap SweetAlert - Confirm dialog box model with yes and no option example
- Jquery notification popup box example using toastr JS plugin with demo
- PHP Script - Login with Facebook using facebook-php-sdk and MySQL example with demo
- PHP Laravel – How to solve “You need to specify a file path to store the seed laravel ” ?