canyin-project/ybcy/controllers/admin/AdminLogController.php
2024-11-01 16:07:54 +08:00

28 lines
675 B
PHP

<?php
namespace app\admin\controllers;
use admin\models\AdminLog;
use yii;
use yii\data\ActiveDataProvider;
class AdminLogController extends CommonController{
public function actionIndex(){
$dataProvider = new ActiveDataProvider([
'query' => AdminLog::find(),
'sort' => [
'defaultOrder' => [
'addtime' => SORT_DESC
]
],
]);
return $this->render('index',[
'dataProvider' => $dataProvider
]);
}
public function actionView($id){
return $this->render('view',[
'model'=>AdminLog::findOne($id),
]);
}
}