PHP code example of davidxu / yii2-admin

1. Go to this page and download the library: Download davidxu/yii2-admin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

davidxu / yii2-admin example snippets


'as access' => [
     'class' => '\davidxu\admin\components\AccessControl',
     'allowActions' => [
        // add wildcard allowed action here!
        'site/*',
        'debug/*',
        'admin/*', // only in dev mode
    ],
],
...,
'modules' => [
	'admin' => [
		'class' => '\davidxu\admin\Module',
	],
	...
],
'components' => [
	'authManager' => [
		'class' => 'yii\rbac\DbManager', // only support DbManager
	],
],

use davidxu\admin\components\MenuHelper;
use davidxu\adminlte4\widgets\Menu;
use Yii;

php composer.phar 

http://localhost/path/to/index.php?r=admin/route

http://localhost/path/to/index.php?r=admin/role

http://localhost/path/to/index.php?r=admin/user

http://localhost/path/to/index.php?r=admin/menu