2017 © Pedro Peláez
 

yii2-extension yii2-admin

Yii2 admin panel extension based on madmin extension

image

darkair/yii2-admin

Yii2 admin panel extension based on madmin extension

  • Sunday, January 22, 2017
  • by DarkAiR
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 15 % Grown

The README.md

Yii2 admin backend panel

Yii2 admin panel based on MAdmin backend admin engine and RBAC., (*1)

Install

php composer.phar require dektrium/yii2-rbac:1.0.0-alpha@dev
php composer.phar require darkair/yii2-admin:dev-master

Setup

In config file:, (*2)

[
    'bootstrap' => ['admin'],
    'modules' => [
        'admin' => [
            'class' => 'darkair\admin\Module',
            'layout' => '@app/views/layouts/admin.twig',   // NOTE: You must make your admin template in advance
            'as access' => [
                'class' => yii\filters\AccessControl::className(),
                'rules' => [
                    [
                        'allow' => true,
                        'roles' => ['adminAccess'],      // Specify the admin permissions
                    ]
                ]
            ]
        ],
        'YOUR_ADMIN_MODULE' => [
            'class' => 'YOUR_ADMIN_MODULE_CLASS',
            'layout' => '@app/views/layouts/admin.twig',            
        ]
    ]
]

Migrate:, (*3)

php yii migrate/up --migrationPath=@yii/rbac/migrations

Usage

  1. Create CRUD models via gii. You must to have <YourModel>.php and <YourModel>Search.php classes at least., (*4)

  2. Make your admin controller:, (*5)

class YourAdminController extends \darkair\admin\AdminController
{
    /**
     * @return string Name of managed model
     */
    public function getManagedModelClass()
    {
        return <YourModel>::className();
    }
}
  1. Create rules like this or on another:
Yii::$app->urlManager->addRules([
    '/admin/YOUR_ROUTE/<action:\w+>/' => 'YOUR_ADMIN_MODULE/YOUR_CONTROLLER/<action>',
], false);

The Versions

22/01 2017

dev-master

9999999-dev

Yii2 admin panel extension based on madmin extension

  Sources   Download

MIT

The Requires

 

by Dmitry DarkAiR Romanov

yii2 admin yii2-admin darkair

22/01 2017

dev-dev-master

dev-dev-master

Yii2 admin panel extension based on madmin extension

  Sources   Download

MIT

The Requires

 

by Dmitry DarkAiR Romanov

yii2 admin yii2-admin darkair