It will have to get the data anyway. The only other way would be to get your data in the same query using a SQL Join but I think you would have to build that query yourself.
If you have multiple datasets you can reduce the number of queries by taking advantage of Eager Loading - but that will only reduce the number of queries from x to 2 so in your case it wouldn't make a difference :)
Not sure it's better, but something like:
$user = User::with('Address')->find(Auth::user()->id)->get();
I'm not able to test the syntax atm, but something like this should eager load the Address. Thou you're still gonna end up with 2 queries.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us