You can use a with
to load the relations in your query:
$memberResult = Member::with('addresses', 'phones', 'emails')->all();
(I assume that the relation functions on your member model are named addresses, phones and emails)
jtsimon93, nickopris, syq246 liked this reply
Thank you @tvbeek
I was able to get it working by using:
$memberResult = Member::with('addresses', 'phones', 'emails')->get();
I really appreciate your help!!
tvbeek, syq246 liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community