exoodev/yii2-system

There is no license information available for the latest version (1.0.3) of this package.

The System extension for the Yii2 framework

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:yii2-extension

1.0.3 2019-05-20 09:56 UTC

This package is auto-updated.

Last update: 2024-03-25 21:31:17 UTC


README

========================

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist exoo/yii2-system

or add

"exoo/yii2-system": "*"

to the require section of your composer.json.

Usage

  1. Example backend configuration:
return [
    'modules' => [
        'system' => [
            'class' => 'exoo\system\Module',
            'isBackend' => true,
        ],
    ],
    'components' => [
        'user' => [
            'identityClass' => 'exoo\system\models\User',
            'enableAutoLogin' => true,
            'loginUrl' => ['/system/site/login'],
            'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true],
        ],
    ],
];
  1. Example frontend configuration:
return [
    'modules' => [
        'system' => [
            'class' => 'exoo\system\Module',
        ]
    ],
];
  1. Example console configuration:
return [
    'modules' => [
        'system' => [
            'class' => 'exoo\system\Module',
            'controllerNamespace' => 'exoo\system\controllers\console',
        ]
    ],
];
  1. Run the migrations
yii migrate --migrationPath=@yii/log/migrations/
yii migrate --migrationPath=@yii/rbac/migrations
yii migrate --migrationPath=@exoo/system/migrations
  1. Init rbac

    yii system/rbac/init
    
  2. Role assignment for super admin

    yii system/user/assign-role admin 1