Thursday, March 16, 2017

laravel blade view templating for

this is  $reviewDetails

Array ( [0] => stdClass Object ( [userId] => 81 [activityId] => 20 [reviewId] => 26 [title] => Nice Trek [description] => Nice Trek [rating] => 4 [userName] => Vikram Acharya [userCity] => wwqqwe [profilePicture] => http://api.ecoterra.in/image/userProfiles/MTQ4OTQ5NzA4NS45OA== [reviewDate] => 2017-03-09 17:10:44 [images] => [status] => 1 ) [1] => stdClass Object ( [userId] => 78 [activityId] => 20 [reviewId] => 33 [title] => Star trek [description] => nice trek [rating] => 4 [userName] => Vikram Acharya [userCity] => [profilePicture] => http://api.ecoterra.in/image/userProfiles/MTQ4OTUwOTYzOS43OA== [reviewDate] => 2017-03-11 12:19:39 [images] => Array ( [0] => stdClass Object ( [title] => my click [file] => http://api.ecoterra.in/uploads/reviews/MTQ4OTIzNDcwNy42OA== ) [1] => stdClass Object ( [title] => my click [file] => http://api.ecoterra.in/uploads/reviews/MTQ4OTIzNDczMi4xMQ== ) ) [status] => 0 ) )


reviews.blade.php file

@foreach($reviewDetails as reviewDetail)
@if(!empty($reviewDetail->images))
@foreach($reviewDetail->images as $reviewImage)
<p><img src=""</p>
@endforeach
@else
<p>No image</p>
@endif
@endforeach

this code doesnt work in laravel and it shows object not found exception ?? How can i display images array in blade template ....please help



via shreyas pimpalkar

Advertisement