I want to hide attribute in my DetailView, for example:
[
'attribute' => $attribute,
'format' => 'raw',
'value' => Yii::$app->formatter->asDatetime($model->$attribute).' par '.Yii::$app->myFormatter->asUser($model->visited_by),
'visible' => false,
];
Visible property doesn't work. What do I have to do?
Do you have any idea?
Thank you
If you need to dinamically determine what is
visible
Then you can trytemplate
option for te DetailView modelIf you know you will not use or even need those hidden values you can also dinamically determine what attributes you pass to DetailView like: