I have a nested data like this which is passed to blade-
I want to display it's data in blade view.
So what I have done is-
<ul class="dropdown-menu h-ctr h-ctr2 col-md-12 col-sm-12">
@foreach ($categories as $category)
<li class="no-border">
<label class="pull-left">
<input type="checkbox" value="" checked>
<strong> (21)</strong>
</label>
<ul>
@foreach($category->sub_category as $sub_cat)
<li>
<label class="pull-left">
<input type="checkbox" checked value="1"> (7)
</label>
</li>
@endforeach
</ul>
</li>
@endforeach
</ul>
And I am getting error for nested loop's part-
foreach($category->sub_category as $sub_cat)
<li>
<label class="pull-left">
<input type="checkbox" checked value="1"> (7)
</label>
</li>
@endforeach
The error is like this-
Can anyone please help?
Thanks in advance for helping.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1r4x7Uz
via IFTTT
Aucun commentaire:
Enregistrer un commentaire