Hello,
When you wish to output an image in the index widget how do you do it please?
Currently I tried this but it does not work:
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'id',
'title',
'posts:ntext',
'keywords',
'created_at:datetime',
'updated_at:datetime',
[
'attribute' => 'categories_id',
'label' => 'Categories',
'value' => 'categories.name',
],
'file', <---------------------------------
// 'categories_id',
// 'user_id',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
Thank you,
Ben