Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

UsmanFarzand's avatar

Eloquent Query

i have two model one is user other one is userprofile with relationship

this query is work perfect User::with('profile')->find($id)->get();

but i know to get record to set condition on userprofile table how i can put condition on userprofile table and get record in this above case i can only put condition only in user table like find, where etc....

0 likes
1 reply

Please or to participate in this conversation.