Skip to content
Discussion options

You must be logged in to vote

@thetutlage I would like to know how I can load nested relationships in both ways (preload & lazy loading). But I am more interested in the preload method. for the Case 1 expected response is there should be data in products array and each product contains media files I should also get the list of media files for each product but I am getting empty array. I have added an expected result for Case 1:

"user": {
    "id": 1,
    "name": "Yash Pal",
    "email": "[email protected]",
    "remember_me_token": null,
    "created_at": "2022-05-16T11:10:24.164+05:30",
    "updated_at": "2022-05-16T11:10:24.164+05:30",
    "products": [
        {
            "id": 1,
            "user_id": "1",…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@iyashpal
Comment options

@iyashpal
Comment options

@AmrMonier
Comment options

@MANTENN
Comment options

@McSneaky
Comment options

Answer selected by iyashpal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants