It is transformed to normal ifs, so your example result in
<?php if ($user->role == 'writer') {?>
<?php if ($view == 'book') {?>
<?php echo $one; ?>
<?php } else {?>
<?php echo $two; ?>
<?php } ?>
But you can combine multiple checks in the same if. So if I correctly understand what you want:
@if ($user->role == 'writer' && $view == 'book')
{{ $one }}
@else
{{ $two }}
@endif
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community