55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace app\controllers;
|
|
|
|
use Yii;
|
|
use app\models\CaptureLogs;
|
|
use app\models\CaptureLogsSearch;
|
|
use yii\web\Controller;
|
|
use yii\filters\VerbFilter;
|
|
use yii\helpers\Url;
|
|
|
|
/**
|
|
* ScriptController implements the CRUD actions for Script model.
|
|
*/
|
|
class CaptureLogsController 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'],
|
|
],
|
|
],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Lists all Script models.
|
|
* @return mixed
|
|
*/
|
|
public function actionIndex() {
|
|
$this->view->title = "Ảnh mẫu";
|
|
$searchModel = new CaptureLogsSearch();
|
|
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
|
|
|
|
return $this->render('index', [
|
|
'searchModel' => $searchModel,
|
|
'dataProvider' => $dataProvider,
|
|
]);
|
|
}
|
|
|
|
|
|
}
|