2 years ago

Eloquent Relationships

Posted 2 years ago by sehmbimanvir

I have a User Model with "Shifts" Relation.

$user = User::find(1); $data = $user->shifts; return $user;

in above case why user is returned with shifts relation ? I just called shifts i didn't assigned shifts to it

Please sign in or create an account to participate in this conversation.