You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will perform two queries. One for all users, and one to fetch all the profiles for these users.
36
36
37
+
The data for the relation will be available under the relation name, in this case `$user->profile`. Data format will respect the `$returnType` set in the `ProfileModel` class.
38
+
37
39
!!! note
38
40
39
41
You can still use your model as usual. If you omit the `with()` part, your model will work like a normal model.
40
42
43
+
### Deep relations
44
+
45
+
We can also call deep relations. This will query all posts for user and then all the comments for posts:
0 commit comments