Replies: 1 comment
-
This should be normally fixed with data v4, the inclusion system is completely rewritten over there to allow these kinds of constructions. Expect the upgrade later this year! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have an idea that could potentially improve the experience of using this library. Let's consider a data class called UserData, which extends the Data class:
Now, let's say we have some other data classes that use the UserData class. In these classes, sometimes we need to include the RoleData property, and sometimes we don't. Currently, when we need to include it, we have to use include('user.role') when creating the DTO object of the class. Here's an example:
In the fromModel construction method of FacilityData, if we try to include the $role property, it will be ignored. However, having this ability would be useful in many cases, especially when we have a tree of data objects that need to be included in a sequence, requiring the use of include() with long paths.
Beta Was this translation helpful? Give feedback.
All reactions