vasadibt/yii2-material-dashboard

Complete dashboard module with login and lock page with material designed template

Installs: 75

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:CSS

Type:yii2-extension

2.2.4 2021-11-26 13:31 UTC

README

1. Install via composer

Yii2-material-dashboard can be installed using composer. Run following command to install:

php composer.phar require vasadibt/yii2-material-dashboard

2. base configurations

Add kartik grid module to the application modules config

'modules' => [
    // ...
    'gridview' => [
        'class' => '\kartik\grid\Module'
    ],
],

Add material to view component theme part in components configurations

'layoutPath' => '@vendor/vasadibt/yii2-material-dashboard/src/views/layouts',

'components' => [
    // ...
    'view' => [
        // ...
        'theme' => [
            'pathMap' => [
                '@vasadibt/materialdashboard/views' => '@app/views',
            ],
        ],
    ],
],

Turn Off the bootstrap4 dependency in BootstrapNotifyAsset class

'components' => [
    // ...
    'assetManager' => [
        // ...
        'bundles' => [
            // ...
            'yii\bootstrap\BootstrapAsset' => ['css' => [], 'js' => [], 'depends' => ['vasadibt\materialdashboard\assets\MaterialAsset']],
            'yii\bootstrap\BootstrapPluginAsset' => ['css' => [], 'js' => [], 'depends' => ['vasadibt\materialdashboard\assets\MaterialAsset']],
            'yii\bootstrap4\BootstrapAsset' => ['css' => [], 'js' => [], 'depends' => ['vasadibt\materialdashboard\assets\MaterialAsset']],
            'yii\bootstrap4\BootstrapPluginAsset' => ['css' => [], 'js' => [], 'depends' => ['vasadibt\materialdashboard\assets\MaterialAsset']],
            'kartik\dialog\DialogBootstrapAsset' => ['depends' => ['vasadibt\materialdashboard\assets\MaterialAsset']],
        ],
    ],
],

And add material config component to components configurations, And set the default app asset class

'components' => [
    // ...
    'material' => [
        'class' => 'vasadibt\materialdashboard\components\Material',
        'appAssetClass' => 'frontend\assets\AppAsset',
    ],
],