I'm trying to write a if() condition with Blade, I have this :
@foreach($users as $user)
<tr>
<td></td>
<td></td>
<td></td>
<td><a href="delmember/">Supprimer le membre</a></td>
@if( == 0)
<td><a href="makeadmin/">Passer l'utilisateur Admin</a></td>
@else
<td><a href="noadmin/">Retirer l'admin à l'utilisateur</a></td>
@endif
</tr>
@endforeach
I want to check if the user is admin or not (column in my users table) but the if returns me 3 errors : first one : if(^here == 0) -> Expected : condition
Seconde one : if( == 0) -> Expected : semicolon
Third one : if(^here == 0) -> Expected : Statement
I searched for a while how to fix it but I don't find, maybe someone could help me.
Thank you :)
Aucun commentaire:
Enregistrer un commentaire