Replies: 7 comments 4 replies
-
If it's well tested and documented I'm always open for PR's 😄 |
Beta Was this translation helpful? Give feedback.
-
@dbpolito could you share the implementation please? I'm facing the issue mentioned in #353 |
Beta Was this translation helpful? Give feedback.
-
@plakhin for not i'm just adding this: public function exceptProperties(): array
{
return [
'attribute' => true,
];
} but i just created a PR for a Hidden attribute, let see if we get this merged: #505 |
Beta Was this translation helpful? Give feedback.
-
@dbpolito, this way properties are also not being saved to the DB in case an eloquent model casts an attribute to Data Object. And since you're modifying |
Beta Was this translation helpful? Give feedback.
-
hey @plakhin , thanks for the feedback... i have pushed some changes that should fix it... i wasn't aware of this feature 😬 |
Beta Was this translation helpful? Give feedback.
-
As said in the PR, the hide attribute should work like except otherwise we create inconsistencies and nobody will understand how any of this works. An option to transform data without running these excepts, onlys and hides is a better solution in this case since it creates clarity. Maybe I'll add this to v4, but PR's are always welcome. |
Beta Was this translation helpful? Give feedback.
-
True @rubenvanassche |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I do have some DTOs that i have some internal properties that i never want to expose, i'm currently using
exceptProperties
within the class with does the job, but i think a better DX would be having aHidden
attribute to annotate which ones i don't want to expose.Are you guys open for a PR for that?
Beta Was this translation helpful? Give feedback.
All reactions