Replies: 1 comment 3 replies
-
Isn't it the same as with class User extends Model
{
protected $casts = [
'settings' => 'json'
];
protected $hidden = [
'settings->api_key' // Would hide 'api_key' from the settings JSON
];
} |
Beta Was this translation helpful? Give feedback.
3 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.
-
Hi everyone,
I'd like to propose adding support for dot notation in Laravel's Model
$hidden
property to hide nested attributes within JSON columns.Current Situation
Right now, if we have a JSON column in our model, we can't easily hide nested attributes using the
$hidden
property.For example:
Proposed Solution
Add support for dot notation in
$hidden
to allow hiding nested JSON attributes:Beta Was this translation helpful? Give feedback.
All reactions