when you do a where()->get() it returns a Collection . you would simply have to loop through it. To get just one item do a where()->first()
Hi.. why don't you do this :
$data=$transac->toArray();
and then pass the $data to your view.. seems like it shall work, if you convert it to array first.
regards
@astroanu - Thanks for your reply, I do actually need to display data from all the arrays and I am looping through it with the last part of my post but there is nothing:( @vidihermes - Thanks for your reply also, I will try and see if it works.
I could access the value by simply using this in my view
@foreach($transac as $info)
<tr>
<th>
{{ $info->sale->amount }}
</th>
</tr>
</thead>
@endforeach
Thanks for all your help.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community