We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I'm push 1 array from PHP via bladeOne.
I foreach it,
` @foreach ($array as $item)
{{ $item->id }} (not working) {{ $item['id'] }} (working)
@Endforeach `
Why?
Thanks!
The text was updated successfully, but these errors were encountered:
It is because you are not parsing an array of object but an array of arrays
$obj=new stdClass(); $obj->id=1; $obj->name="john"; $arrObject=[$obj,$obj];
@foreach($arrayobjects as $item) item:{{$item->id}} {{$item->name}}<br> @endforeach
$arr=['id'=>1,'name'=>'John']; $arrays=[$arr,$arr];
@foreach($arr as $item) item:{{$item['id']}} {{$item['name']}}<br> @endforeach
Sorry, something went wrong.
No branches or pull requests
Hi,
I'm push 1 array from PHP via bladeOne.
I foreach it,
`
@foreach ($array as $item)
@Endforeach
`
Why?
Thanks!
The text was updated successfully, but these errors were encountered: