Support the ongoing development of →
posted 1 year ago
Last updated 1 year ago.

syq246 liked this thread

moderator Solution

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

Solution selected by @jtsimon93

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!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.