diff --git a/backend/controllers/ParserController.php b/backend/controllers/ParserController.php index f6f2b65..fc1aa9c 100644 --- a/backend/controllers/ParserController.php +++ b/backend/controllers/ParserController.php @@ -15,6 +15,12 @@ use app\components\parsers\ParserHandler; */ class ParserController extends Controller { + + public function beforeAction($action) { + $this->enableCsrfValidation = false; + return parent::beforeAction($action); + } + /** * @inheritdoc */ @@ -54,11 +60,10 @@ class ParserController extends Controller public function actionIndex() { - Yii::$app->controller->enableCsrfValidation = false; $model = new UploadFileParsingForm(); if (Yii::$app->request->isPost) { - + die('here'); $model->file = UploadedFile::getInstance($model, 'file'); if ($model->file && $model->validate()) { diff --git a/backend/views/layouts/main.php b/backend/views/layouts/main.php index 33b80bd..a4c0383 100644 --- a/backend/views/layouts/main.php +++ b/backend/views/layouts/main.php @@ -14,13 +14,12 @@ use yii\widgets\Menu; AppAsset::register($this); ?> beginPage() ?> - - + - - AdminLTE 2 | Dashboard - - + + + + <?= Html::encode($this->title) ?> head() ?> -- libgit2 0.21.4