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
For me this works best:
class="{{url()->current() == route('dashboard') ? 'bg-gray-900 text-white' : 'text-gray-300'}}"