Last active
August 14, 2020 11:09
-
-
Save larek/98c84bc8b88ef36ea0b04fddb6848419 to your computer and use it in GitHub Desktop.
Update modules/admin/Module.php file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace app\modules\admin; | |
use yii\filters\AccessControl; | |
/** | |
* admin module definition class | |
*/ | |
class Module extends \yii\base\Module | |
{ | |
/** | |
* {@inheritdoc} | |
*/ | |
public function behaviors() | |
{ | |
return [ | |
'access' => [ | |
'class' => AccessControl::class, | |
'rules' => [ | |
[ | |
'allow' => true, | |
'roles' => ['@'], | |
], | |
], | |
] | |
]; | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public $controllerNamespace = 'app\modules\admin\controllers'; | |
/** | |
* {@inheritdoc} | |
*/ | |
public function init() | |
{ | |
parent::init(); | |
// custom initialization code goes here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment