jeudi 30 novembre 2017

elseif statement with foreach loop error in laravel

I am trying to do a if else statement with a foreach loop but for some reason I am getting this error

Parse error: syntax error, unexpected 'elseif' (T_ELSEIF).

I know that this is a simple error but I can't seem to identify what is wrong here, did I do my code wrongly? Or is it something that need to be closed? (for the closing part, I have checked and I don't really see any problem with it) Can someone help me? Thanks a lot

profile.blade.php

@foreach($data as $value) 
  <tr> 
 @if($value->training_Status == 'No')
 <th><a href=""><span style="color: blue;"></span></a></th>
 @foreach($data1 as $value1)
  @elseif(($value1->blacklist == 'Yes') && ($value1->name == $value->Name))
 <th><a href=""><span style="color: red;"></span></a></th>
  @endforeach
 @else 
<th><a href=""></a></th>
 @endif 
 </tr> 
 @endforeach

Aucun commentaire:

Enregistrer un commentaire