index.php 689 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. use yii\grid\GridView;
  3. /* @var $this yii\web\View */
  4. /* @var $dataProvider yii\data\ActiveDataProvider */
  5. $this->title = '操作记录';
  6. $this->params['breadcrumbs'][] = $this->title;
  7. ?>
  8. <div class="handle-index">
  9. <?= GridView::widget([
  10. 'dataProvider' => $dataProvider,
  11. 'columns' => [
  12. 'title',
  13. [
  14. 'attribute'=>'addtime',
  15. 'value'=>function($model){
  16. return date('Y-m-d H:i:s',$model->addtime);
  17. },
  18. ],
  19. ['class' => 'yii\grid\ActionColumn','template'=>'{view}']
  20. ],
  21. 'tableOptions'=>['class' => 'table table-striped']
  22. ]); ?>
  23. </div>