Lazy loading relationships on wide tables/models #334
Unanswered
drew-acheson
asked this question in
Q&A
Replies: 1 comment 8 replies
-
I'm new to laravel-data too, but here's what I'm doing in my fromModel method:
This way I let spatie/laravel-data's model normalizer do most of the work, then set the things I want to be lazy as lazy. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a data object that has quite a few properties in it's constructor. Is there a way to use lazy loading (on the last property listed here) without having to restate all these properties in the
fromModel()
function? An example of my model is below.Beta Was this translation helpful? Give feedback.
All reactions