I have a forach loop in a blade (laravel version 5.3). I want to use break in it. But I get
htmlspecialchars() expects parameter 1 to be string, object given error.
I also try to do it with for loop. but I gave same error.
@foreach ($payment as $factor)
@break($factor->factor_id == -1);
<tr>
<td></td>
<td></td>
</tr>
@endforeach
also I tried
@foreach ($payment as $factor)
<?php
if($factor->factor_id == -1);
break;
?>
<tr>
<td></td>
<td></td>
</tr>
@endforeach
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire