Why is BaseResourceService::addRelationsToExistingModel defined if it is not used? #5
Answered
by
macropay-solutions
marius-mcp
asked this question in
Q&A
-
Hi, |
Beta Was this translation helpful? Give feedback.
Answered by
macropay-solutions
Nov 14, 2024
Replies: 1 comment 1 reply
-
Hi and welcome. you will see we are using with. The eager loading in laravel and lumen had and still has some bugs as you saw in the issues from laravel github laravel/framework#51825. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
marius-mcp
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi and welcome.
If you look at the get function
laravel-crud-wizard-free/src/Services/BaseResourceService.php
Line 41 in 1d3a509
you will see we are using with.
The eager loading in laravel and lumen had and still has some bugs as you saw in the issues from laravel github laravel/framework#51825.
The get can be easily overwritten to not use with but use this unused by default function, that will avoid the eager loading.