How to display data from relation defined while exporting the data #3438
Unanswered
yashimaahuja6
asked this question in
Q&A
Replies: 1 comment
-
According to the error |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is my export.blade.php --
@foreach($accessories as $accessory)
{{ $accessory->id }}
{{ $accessory->user->name}}
{{ $accessory->store->channel_id }}
{{ $accessory->request_date }}
{{ $accessory->status }}
{{ $accessory->details->vendor->name }}
{{ $accessory->details->barcode }}
{{ $accessory->details->description }}
@Endforeach
It is fetching data from accessoryrequestexport.php
public function view(): View
{
return view('accessorydetails.export', [
'accessories' => AccessoryRequest::with('details', 'user', 'store')->get()
]);
}
where as it gives me result as -- Property [vendor] does not exist on this collection instance.
please help
Beta Was this translation helpful? Give feedback.
All reactions