wdmg/yii2-admin

Administrative panel for Butterfly.CMS

Installs: 24

Dependents: 1

Suggesters: 0

Stars: 2

Watchers: 3

Forks: 1

Open Issues: 0

Language:CSS

Type:yii2-extension

1.1.8 2019-09-09 17:51 UTC

README

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',
        'checkForUpdates' => true, // boolean, the flag if updates check turn on
        'cacheExpire' => 3600 // integer, the time to expire cache
    ],
    ...
],

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.8 - Fix console, styling sidebar submenu
  • v.1.1.7 - Added bug report functionality, fix check updates for modules. Update dependencies
  • v.1.1.6 - Logo fix, add check for updates notify for modules