BladeOne
BladeOne copied to clipboard
Foreach returning error
Hi,
I am looping through an array using @foreach but it throughs this error:
syntax error, unexpected token ";"
The compiled file shows $__currentLoopData = ;
Any ideas what could be causing this, or is it a bug?
Do you still have this problem? If this problem has already been resolved, this issue can be closed.
Can you share an example data? @foreach is not enough. This must be done with a variable, for example: @foreach($items as $item).
No I had to use a standard for loop, the foreach did have an array assigned. I am busy at the moment, but when I have time I will send across the full code.