PHP code example of rrmontuan / yii2-materialadmin-asset

1. Go to this page and download the library: Download rrmontuan/yii2-materialadmin-asset 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/ */

    

rrmontuan / yii2-materialadmin-asset example snippets


'components' => [
    'view' => [
         'theme' => [
             'pathMap' => [
                '@app/views' => '@vendor/rrmontuan/yii2-materialadmin-asset/example-views/yiisoft/yii2-app'
             ],
         ],
    ],
],

'components' => [
	'assetManager' => [
		'bundles' => [
			'rrmontuan\web\MaterialAdminAsset' => [
    			'sourcePath' => '@app\myfolder'
			],
		],
	],
],

use yii\web\AssetBundle;
class MaterialAdminPluginAsset extends AssetBundle
{
    public $sourcePath = '@app/templates/materialadmin';
    public $js = [
        // more plugin Js here
    ];
    public $css = [
        // more plugin CSS here
    ];
    public $depends = [
        'rrmontuan\web\MaterialAdminAsset',
    ];
}

'items'=>[
	[
		'label' => 'Dashboards Slideshow',
		'icon' => 'now-widgets',
		'url' => ['/site/about'],
		'visible' => true
	],
	[
		'label' => 'Tables',
		'icon' => 'view-list',
		'url' => ['/site'],
		'items' => [
			['label' => 'Normal Tables', 'url' => ['/site/contact'],],
			['label' => 'Data Tables', 'url' => ['/site/index'],],
		],
	],
]

if (YII_ENV_DEV) {    
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',      
        'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '192.168.178.20'],  
        'generators' => [ //here
            'crud' => [
                'class' => 'yii\gii\generators\crud\Generator',
                'templates' => [
                    'materialadmin' => '@vendor/rrmontuan/yii2-materialadmin-asset/gii/templates/crud/simple',
                ]
            ]
        ],
    ];
}