I have the following loop in template:
@foreach ($hotel->first()->images as $key => $image)
// Here I try to get $image->id
@endforeach
So, if display object:
It shows:
{"id":1,"filename":"5c52f95a48809728c7b4f2af2825cfb8.jpg","size":58349,"extention":"jpg","created_at":null,"path":"uploads","idElement":9}
When I try to get access to $image->id insise loop I get error.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire