Skip to content

smolnaya-milena/yii2-admin

 
 

Repository files navigation

Yii2 Github all releases Progress GitHub license GitHub release

Yii2 Admin Module

Administrative panel for Butterfly.CMS

Requirements

  • PHP 5.6 or higher
  • Yii2 v.2.0.20 and newest
  • Yii2 Base module (required)
  • Yii2 Users module (required)

Installation

To install the module, run the following command in the console:

$ composer require "wdmg/yii2-admin"

After configure db connection, run the following command in the console:

$ php yii admin/init

And select the operation you want to perform:

  1. Apply all modules migrations
  2. Revert all modules migrations

Migrations

In any case, you can execute the migration and create the initial data, run the following command in the console:

$ php yii migrate --migrationPath=@vendor/wdmg/yii2-admin/migrations

Configure

To add a module to the project, add the following data in your configuration file:

'modules' => [
    ...
    'admin' => [
        'class' => 'wdmg\admin\Module',
        'routePrefix' => 'admin'
    ],
    ...
],

Routing

Use the Module::dashboardNavItems() method of the module to generate a navigation items list for NavBar, like this:

<?php
    echo Nav::widget([
    'options' => ['class' => 'navbar-nav navbar-right'],
        'label' => 'Modules',
        'items' => [
            Yii::$app->getModule('admin')->dashboardNavItems(),
            ...
        ]
    ]);
?>

Status and version [ready to use]

  • v.1.1.4 - Added Mailer and News modules to support
  • v.1.1.3 - Added priority of loading modules
  • v.1.1.2 - Added support of Terminal module

About

Administrative panel for Butterfly.CMS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 58.2%
  • PHP 27.3%
  • JavaScript 14.5%