This commit is contained in:
2020-10-06 14:27:47 +07:00
commit 586be80cf6
16613 changed files with 3274099 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace app\controllers;
use Yii;
use yii\web\Controller;
use yii\filters\VerbFilter;
/**
* ScriptController implements the CRUD actions for Script model.
*/
class DashboardController extends Controller {
public function init() {
parent::init();
if (Yii::$app->user->isGuest)
return $this->redirect(['/site/login']);
}
/**
* {@inheritdoc}
*/
public function behaviors() {
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
public function actionIndex() {
if (!Yii::$app->user->can('administrator'))
throw new \yii\web\HttpException(403, 'Bạn không có quyền truy cập nội dung này');
$this->view->title = "Bảng điều khiển";
$this->view->params['breadcrumbs'][] = 'Bảng điều khiển';
$tungbui = "vcl";
return $this->render('index', [
"tungbui" => $tungbui
]);
}
}