We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2155cf4 commit 5459f0dCopy full SHA for 5459f0d
backend/config/components.php
@@ -8,7 +8,9 @@
8
'request' => [
9
'cookieValidationKey' => file_get_contents(__DIR__ . '/cookie-validation.key'),
10
],
11
-
+ 'errorHandler' => [
12
+ 'errorAction' => 'site/error',
13
+ ],
14
'urlManager' => [
15
'enablePrettyUrl' => true,
16
'enableStrictParsing' => true,
backend/controllers/SiteController.php
@@ -3,12 +3,22 @@
3
namespace backend\controllers;
4
5
use yii\web\Controller;
6
+use yii\web\ErrorAction;
7
/**
*
*/
class SiteController extends Controller
{
+ public function actions()
+ {
+ return array_merge(parent::actions(), [
+ 'error' => [
17
+ 'class' => ErrorAction::class,
18
19
+ ]);
20
+ }
21
+
22
public function actionIndex()
23
24
return $this->render('index');
0 commit comments