PHP code example of alvarolordelo / yii2-materialize

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

    

alvarolordelo / yii2-materialize example snippets


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

\alvarolordelo\yii2materialize\assets\MaterializeAsset::register($this);

// further code

// @app/assets/AppAsset.php

public $depends = [
    'alvarolordelo\yii2materialize\assets\MaterializeAsset',
    // more dependencies
];

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

$config['modules']['gii'] = [
    'class' => 'yii\gii\Module',      
    'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '192.168.178.20'],  
    'generators' => [
        'crud' => [
            'class' => 'yii\gii\generators\crud\Generator',
            'templates' => [ // setting materializecss templates
                'materialize' => '@vendor/alvarolordelo/yii2-materialize/src/gii-templates/generators/crud/materialize',
            ]
        ]
    ],
];

$ composer global 
views/layouts/main.php