HidesAttributes
trait HidesAttributes
Properties
$hidden | The attributes that should be hidden for serialization. |
||
protected array | $visible | The attributes that should be visible in serialization. |
Methods
Get the hidden attributes for the model.
Set the hidden attributes for the model.
Add hidden attributes for the model.
Get the visible attributes for the model.
Set the visible attributes for the model.
Add visible attributes for the model.
Make the given, typically hidden, attributes visible.
Make the given, typically visible, attributes hidden.
Details
at line 26
array
getHidden()
Get the hidden attributes for the model.
at line 37
$this
setHidden(array $hidden)
Set the hidden attributes for the model.
at line 50
void
addHidden(array|string|null $attributes = null)
Add hidden attributes for the model.
at line 62
array
getVisible()
Get the visible attributes for the model.
at line 73
$this
setVisible(array $visible)
Set the visible attributes for the model.
at line 86
void
addVisible(array|string|null $attributes = null)
Add visible attributes for the model.
at line 99
$this
makeVisible(array|string $attributes)
Make the given, typically hidden, attributes visible.
at line 116
$this
makeHidden(array|string $attributes)
Make the given, typically visible, attributes hidden.