1. Go to this page and download the library: Download diezz/yii2-module-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/ */
diezz / yii2-module-admin example snippets
return [
'modules' => [
'admin' => [
'class' => 'Diezz\ModuleAdmin\Module',
// Place your views in this directory
'viewPath' => '@app/views/admin',
'controllerMap' => [
'first' => 'app\controllers\FirstController',
'second' => 'app\controllers\SecondController',
],
'view' => [
'class' => AdminView::class,
'skin' => AdminView::SKIN_RED,
// You may specify an extra assets
'extraAssets' => [
// Like class name:
ExtraAsset::class,
// Or like config aray:
[
'class' => AnotherAsset::class,
],
],
// Menu config
'sidebarMenuConfig' => [
'menuItems' => [
[
'title' => 'First menu item',
'icon' => 'fa fa-envelope',
'url' => '/admin/first',
],
[
'title' => 'Second menu item',
'icon' => 'fa fa-envelope',
'url' => '/admin/second',
'children' => [
[
'title' => 'First sub-menu item',
'icon' => 'fa fa-circle',
'url' => '/admin/second/first',
],
[
'title' => 'Second sub-menu item',
'icon' => 'fa fa-circle',
'url' => '/admin/second/second',
],
],
],
],
],
],
],
],
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.