PHP code example of exocet / yii2-bootstrap-material-design

1. Go to this page and download the library: Download exocet/yii2-bootstrap-material-design 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/ */

    

exocet / yii2-bootstrap-material-design example snippets


// @app/views/layouts/main.php

\exocet\bootstrap5md\MaterialAsset::register($this); // further code

// @app/assets/AppAsset.php

public $depends = [
    // clude Fontawesome icons (optional)
    'exocet\bootstrap5md\FontawesomeAsset',

    // 

// @app/config/web.php
'components' => [
    'assetManager' => [
        'bundles' => [
            'yii\bootstrap5\BootstrapAsset' => [
                'class' => \exocet\bootstrap5md\BootstrapAsset::class,
            ],
            'yii\bootstrap5\BootstrapPluginAsset' => [
                'class' => \exocet\bootstrap5md\BootstrapPluginAsset::class,
            ],
        ],
    ],

// @app/config/main-local.php

$config['modules']['gii'] = [
    'class' => 'yii\gii\Module',      
    'allowedIPs' => ['127.0.0.1', '::1'],  
    'generators' => [
        'crud' => [
            'class' => 'yii\gii\generators\crud\Generator',
            'templates' => [
                'material-bootstrap' => '@vendor/exocet/yii2-bootstrap-material-design/src/generators/crud',
            ]
        ]
    ],
];