I am using Laravel 4. I would like to access the current URL inside an @if condition in a view using the Laravel\'s Blade templating engine but I don\'t know ho
@if
You will get the url by using the below code.
url
For Example your URL like https//www.example.com/testurl?test
https//www.example.com/testurl?test
echo url()->current(); Result : https//www.example.com/testurl echo url()->full(); Result: https//www.example.com/testurl?test