Giter Site home page Giter Site logo

yii2-full-admin's Introduction

Yii2 Full Admin

Latest Stable Version Total Downloads Latest Unstable Version License

Module for administration with user management

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist nullref/yii2-full-admin "*"

or add

"nullref/yii2-full-admin": "*"

to the require section of your composer.json file.

Then You have run console command for install this module and run migrations:

php yii module/install nullref/yii2-full-admin

Also, you have to add \nullref\fulladmin\Bootstrap class to bootstrap:

//config
    'bootstrap' => [
        //..
        \nullref\fulladmin\Bootstrap::class,
        //...
    ],

Pay attention that if you don't use our application template it needs to change config files structure to have ability run commands that show above.

Please check this documentation section

Admin Menu

For adding items to admin menu you have to implement IAdminModule interface, e.g.:

public static function getAdminMenu()
   {
       return [
           'label' => \Yii::t('admin', 'Subscription'),
           'icon' => 'envelope',
           'order' => 0,
           'items' => [
               'emails' => ['label' => \Yii::t('app', 'Subscribers'), 'icon' => 'envelope-o', 'url' => ['/subscription/email/index']],
               'messages' => ['label' => \Yii::t('app', 'Messages'), 'icon' => 'envelope-o', 'url' => ['/subscription/message/index']],
           ]
       ];
   }

Admin Controller

If you use IAdminController interface in controller, admin layout and default access rule will be set in controller before action.

Modules system

This module integrated in system which contain other useful components. View details

Overriding

Example:

/** module config **/

'admin' => [
   'class' => 'nullref\admin\Module',
   'controllerMap' => [  //controllers
      'main' => 'app\modules\admin\controllers\MainController',
   ],
   'components' => [  //menu builder
      'menuBuilder' => 'app\\components\\MenuBuilder',
   ],
],

And translations

yii2-full-admin's People

Contributors

lijkbezorger avatar zayec77 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

ratanasoth

yii2-full-admin's Issues

View not Found โ€“ yii\base\ViewNotFoundException

After registration throw exception:

View not Found โ€“ yii\base\ViewNotFoundException
The view file does not exist: /var/www/yii2-first/vendor/nullref/yii2-full-admin/src/modules/user/views/message.php

In submodule User not exists view file message.php

PHP Notice 'yii\base\ErrorException' with message 'Undefined index: user'

Howdy,

A fresh install of Yii2 basic and after running the command:

composer require --prefer-dist nullref/yii2-full-admin "*"

And then, this for a second time as the installed_modules.php file is not created automatically,. so added <?php return []; to it:

php yii module/install nullref/yii2-full-admin

I get this message, the same happens for your other modules too.

Any ideas?

D:\xampp7\htdocs\yii-play\basic>php yii module/install nullref/yii2-full-admin
 Module "user" installing:
Rewrite exist config? (yes|no) [no]:yes
Module config was rewrote
PHP Notice 'yii\base\ErrorException' with message 'Undefined index: user'

in D:\xampp7\htdocs\yii-play\basic\vendor\nullref\yii2-core\src\components\ModuleInstaller.php:81

Stack trace:
#0 D:\xampp7\htdocs\yii-play\basic\vendor\nullref\yii2-core\src\components\ModuleInstaller.php(81): yii\base\ErrorHandler->handleError(8, 'Undefined index...', 'D:\\xampp7\\htdoc...', 81, Array)
#1 D:\xampp7\htdocs\yii-play\basic\vendor\nullref\yii2-full-admin\src\Installer.php(32): nullref\core\components\ModuleInstaller->install()
#2 D:\xampp7\htdocs\yii-play\basic\vendor\nullref\yii2-core\src\console\ModuleController.php(39): nullref\fulladmin\Installer->install()
#3 D:\xampp7\htdocs\yii-play\basic\vendor\nullref\yii2-core\src\console\ModuleController.php(31): nullref\core\console\ModuleController->runInstallerCommand('nullref/yii2-fu...', 'install', 'Module module w...')
#4 [internal function]: nullref\core\console\ModuleController->actionInstall('nullref/yii2-fu...')
#5 D:\xampp7\htdocs\yii-play\basic\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array)
#6 D:\xampp7\htdocs\yii-play\basic\vendor\yiisoft\yii2\base\Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#7 D:\xampp7\htdocs\yii-play\basic\vendor\yiisoft\yii2\console\Controller.php(144): yii\base\Controller->runAction('install', Array)
#8 D:\xampp7\htdocs\yii-play\basic\vendor\yiisoft\yii2\base\Module.php(528): yii\console\Controller->runAction('install', Array)
#9 D:\xampp7\htdocs\yii-play\basic\vendor\yiisoft\yii2\console\Application.php(180): yii\base\Module->runAction('module/install', Array)
#10 D:\xampp7\htdocs\yii-play\basic\vendor\yiisoft\yii2\console\Application.php(147): yii\console\Application->runAction('module/install', Array)
#11 D:\xampp7\htdocs\yii-play\basic\vendor\yiisoft\yii2\base\Application.php(386): yii\console\Application->handleRequest(Object(yii\console\Request))
#12 D:\xampp7\htdocs\yii-play\basic\yii(20): yii\base\Application->run()
#13 {main}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.