You cannot write both php if syntax and laravel blade @if syntax.
However, you can do like this:
@if
@else
<?php if(true){
}
?>
@endif
Inline if statements...
{{ 1===1 ? 'say 1' : 'say 2' }}
https://stackoverflow.com/questions/25284344/ternary-in-laravel-blade
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community