Replies: 1 comment
-
Hi @akimkelar Could you try to use except method ? ConfigData::from(ConfigModel::first())->except('model') Also, with this method, you cannot be limited to Lazy property. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I have a data object, and I want to exclude one field from the serialization, regardless was it initialized or not.
I expected it to be done easily with some annotation like
Exclude
. But it seems, it's not the case.I tried to use class
Lazy
likeBut it works only when
$model
was not initialized. When it was initialized with some real model, I get all the attributes of the model there.Could you hint me please how it could be excluded forever?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions