I just found out about using @unless
instead of if(!...)
so I changed some of my clauses.
But I just realized that I had an if-else-statement, so I only changed it from this:
@if (!empty($data['note']))
<p></p>
@else
<p>no information given</p>
@endif
to this:
@unless (empty($data['note']))
<p></p>
@else
<p>no information given</p>
@endunless
But it didn't change anything and seems working correctly.
Is it okay/normal to use @else
and @elseif
within @unless-statement?
Aucun commentaire:
Enregistrer un commentaire