I get data with relations from controller but can't use in blade
Controller..
$employees = Post::where('user_id', $user_id)->with('people')->get();
Blade, I use in foreach like ..
$employee->people->image
But it gives error
Property [image] does not exist on this collection instance.
When I dd($employees)
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire