Preview

'; foreach (Carousel::find()->all() as $slide) { $QueryFunction = $slide->query; if($QueryFunction) $QueryFunction2 = Carousel::$QueryFunction(); else $QueryFunction2 = ""; echo '
'.$QueryFunction2.' '.$slide->caption.'
'; ?>
Bootstrap Slider

'btn btn-success']) ?>

$dataProvider, // 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], // 'carouselid', [ 'attribute' => 'img', 'format' => 'html', 'label' => 'Image', 'value' => function ($data) { return Html::img($data['imageurl'], ['width' => '150px']); }, ], ['label'=>'Target Website', 'format'=>'html', 'attribute'=>'a', 'value'=>function($data) {return Html::a('Target Page',$data['targeturl']); } ], 'caption', 'query', // 'order', // 'createdwhen', // 'createdby', ['label'=>'Change Sequence', 'format'=>'html', 'attribute'=>'a', 'value'=>function($data) {return Html::a('↑','move?d=u&id='.$data['carouselid']).' '.Html::a('↓','move?d=d&id='.$data['carouselid']); } ], ['class' => 'yii\grid\ActionColumn'], ], ]); ?>