mihaildev/yii2-backend

The Backend extension for the Yii2 framework

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type: yii2-extension

1.0.1 2016-05-03 16:59 UTC

README

The Backend extension for the Yii2 framework

Config file.

        'preload'=>['backend'],
        ...
        'components' => [
        ...
                'backend' => [
                        'class' => 'mihaildev\backend\Component',

                        'onBackend' => function(){
                                Yii::$app->user->loginUrl = ['/backend/login'];
                        },
                        'onFrontend' => function(){
                                Yii::$app->user->loginUrl = ['/site/login'];
                        },


                ],
          ...
          ]

Controller (only for backend)

class SomeController extends Controller implements BackendControllerInterface{

}