view.php 713 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Author: lf
  4. * Blog: https://blog.feehi.com
  5. * Email: job@feehi.com
  6. * Created at: 2016-04-14 10:09
  7. */
  8. use yii\widgets\DetailView;
  9. /**
  10. * @var $this yii\web\View
  11. * @var $model common\models\AdminLog
  12. */
  13. $this->title = "Log Detail";
  14. ?>
  15. <?= DetailView::widget([
  16. 'model' => $model,
  17. 'attributes' => [
  18. 'id',
  19. 'user_id',
  20. [
  21. 'label' => Yii::t('app', 'Admin'),
  22. 'attribute' => 'user',
  23. 'value' => function($model){
  24. return $model->user->username;
  25. }
  26. ],
  27. 'route',
  28. 'created_at:datetime',
  29. [
  30. 'attribute' => 'description',
  31. 'format' => 'raw',
  32. ]
  33. ],
  34. ]) ?>