HidesAttributes

Hides and shows attributes for serialization.

 trait Winter\Storm\Database\Concerns\HidesAttributes

Methods

public addHidden (array | string | null $attributes = null) : void

Add hidden attributes for the model.

This restores the addHidden method that was removed from Laravel 7 onwards. It is however recommended to use the makeHidden method going forward.

Parameters
Property Description
$attributes
array | string | null
Returns
void

public addVisible (array | string | null $attributes = null) : void

Add visible attributes for the model.

This restores the addVisible method that was removed from Laravel 7 onwards. It is however recommended to use the makeVisible method going forward.

Parameters
Property Description
$attributes
array | string | null
Returns
void
Copyright © 2024 Winter CMS