28 lines
675 B
PHP
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),
|
|
]);
|
|
}
|
|
|
|
} |