HidesAttributes
Table of Contents
- $hidden : array<string|int, mixed>
- The attributes that should be hidden for serialization.
- $visible : array<string|int, mixed>
- The attributes that should be visible in serialization.
- addHidden() : void
- Add hidden attributes for the model.
- addVisible() : void
- Add visible attributes for the model.
- getHidden() : array<string|int, mixed>
- Get the hidden attributes for the model.
- getVisible() : array<string|int, mixed>
- Get the visible attributes for the model.
- makeHidden() : $this
- Make the given, typically visible, attributes hidden.
- makeVisible() : $this
- Make the given, typically hidden, attributes visible.
- setHidden() : $this
- Set the hidden attributes for the model.
- setVisible() : $this
- Set the visible attributes for the model.
Properties
$hidden
The attributes that should be hidden for serialization.
protected
array<string|int, mixed>
$hidden
= []
$visible
The attributes that should be visible in serialization.
protected
array<string|int, mixed>
$visible
= []
Methods
addHidden()
Add hidden attributes for the model.
public
addHidden([array<string|int, mixed>|string|null $attributes = null ]) : void
Parameters
- $attributes : array<string|int, mixed>|string|null = null
Return values
void —addVisible()
Add visible attributes for the model.
public
addVisible([array<string|int, mixed>|string|null $attributes = null ]) : void
Parameters
- $attributes : array<string|int, mixed>|string|null = null
Return values
void —getHidden()
Get the hidden attributes for the model.
public
getHidden() : array<string|int, mixed>
Return values
array<string|int, mixed> —getVisible()
Get the visible attributes for the model.
public
getVisible() : array<string|int, mixed>
Return values
array<string|int, mixed> —makeHidden()
Make the given, typically visible, attributes hidden.
public
makeHidden(array<string|int, mixed>|string $attributes) : $this
Parameters
- $attributes : array<string|int, mixed>|string
Return values
$this —makeVisible()
Make the given, typically hidden, attributes visible.
public
makeVisible(array<string|int, mixed>|string $attributes) : $this
Parameters
- $attributes : array<string|int, mixed>|string
Return values
$this —setHidden()
Set the hidden attributes for the model.
public
setHidden(array<string|int, mixed> $hidden) : $this
Parameters
- $hidden : array<string|int, mixed>
Return values
$this —setVisible()
Set the visible attributes for the model.
public
setVisible(array<string|int, mixed> $visible) : $this
Parameters
- $visible : array<string|int, mixed>