I'm making a horizontal navigation menu in Blade (Laravel 5.7) with the typical effect that the option corresponding to the current page looks different, and in my case the link has been removed, without any problem with a code like this for each menu item:
@if (Request :: is (& # 39; / & # 39;)) At home @endif@else
The doubt has arisen because one of the options of the menu is displayed according to a value set in the configuration or not.
I was able to solve it
@unless (! Config :: get (& # 39; app.events & # 39;))
@if (Request :: is (& # 39; events & # 39;)) Events @endif@endunless @else
but I started testing with:
@if (config :: get (& # 39; app.events & # 39;))
@if (Request :: is (& # 39; events & # 39;)) Events @endif@endif @else
This last code cascaTherefore, my question arises.
If you need to use conditional nesting in Bladeas in the previous example Is there a possibility that is not in a block?
@php // php code ... @endphp