Illuminate\Database\Eloquent\Model::makeVisible PHP Method

makeVisible() public method

Make the given, typically hidden, attributes visible.
public makeVisible ( array | string $attributes )
$attributes array | string
    public function makeVisible($attributes)
    {
        $this->hidden = array_diff($this->hidden, (array) $attributes);
        if (!empty($this->visible)) {
            $this->addVisible($attributes);
        }
        return $this;
    }

Usage Example

 /**
  * ModelSnapshot constructor.
  *
  * @param Model $model
  * @param string $event
  */
 protected function __construct(Model $model, $event)
 {
     $this->model = $model->makeVisible($model->getHidden());
     $this->event = $event;
 }
Model