我想在 DetailView 中使用视频
'attribute' => ['media_id',
'format' => 'html',
'value' => function ($model)
{
$image = app\models\Media::find()->where(['id' => $model->media_id])->asArray()->one();
$url = $image['url'];
$host = Yii::$app->params['uploadPath'];
return Html::video("$host/" . $url, ['width' => '60px']);
},
'label' => 'عکس',
],
如何在本节中使用 HTML 中的视频?
这是我使用视频的错误:
name":"Exception","message":"Call to undefined method yii\\bootstrap\\Html::video()"