init Area full CRUD
This commit is contained in:
25
widgets/SystemLogsView.php
Normal file
25
widgets/SystemLogsView.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace app\widgets;
|
||||
|
||||
use yii\base\Widget;
|
||||
use app\models\SystemLogs;
|
||||
use app\models\User;
|
||||
|
||||
class SystemLogsView extends Widget {
|
||||
|
||||
public $type;
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
}
|
||||
|
||||
public function run() {
|
||||
|
||||
return $this->render("system-logs-view", [
|
||||
"logs" => SystemLogs::find()->andWhere(["type" => $this->type])->orderBy(['time' => SORT_DESC])->limit(30)->all(),
|
||||
"userArray" => User::userArray()
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user