Model as parameter #4507
Closed
UesleyCarossi
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
The |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Current behavior:
When using dependency inversion with BaseModel, LucidModel built-in properties and methods (like find, findBy, and query) become inaccessible. This makes it difficult to leverage model functionality when passing them as parameters to other functions or classes.
Desired behavior:
We would like the ability to pass Lucid models as parameters while still maintaining access to their built-in properties and methods. This would allow for a more flexible and reusable approach to dependency injection with Lucid models.
Benefits:
Beta Was this translation helpful? Give feedback.
All reactions