PHP code example of hail812 / yii2-adminlte3
1. Go to this page and download the library: Download hail812/yii2-adminlte3 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/ */
hail812 / yii2-adminlte3 example snippets
'components' => [
'view' => [
'theme' => [
'pathMap' => [
'@app/views' => '@vendor/hail812/yii2-adminlte3/src/views'
],
],
],
],
<?= \hail812\adminlte\widgets\Alert::widget([
'type' => 'success',
'body' => '<h3>Congratulations!</h3>'
])
/* @var $this \yii\web\View */
\hail812\adminlte3\assets\PluginAsset::register($this)->add('sweetalert2');
// or
\hail812\adminlte3\assets\PluginAsset::register($this)->add(['sweetalert2', 'toastr']);
return [
'adminEmail' => '[email protected] ',
'hail812/yii2-adminlte3' => [
'pluginMap' => [
'sweetalert2' => [
'css' => 'sweetalert2-theme-bootstrap-4/bootstrap-4.min.css',
'js' => 'sweetalert2/sweetalert2.min.js'
],
'toastr' => [
'css' => ['toastr/toastr.min.css'],
'js' => ['toastr/toastr.min.js']
],
]
]
];
/* @var $this \yii\web\View */
$bundle = \hail812\adminlte3\assets\PluginAsset::register($this);
$bundle->css[] = 'sweetalert2-theme-bootstrap-4/bootstrap-4.min.css';
$bundle->js[] = 'sweetalert2/sweetalert2.min.js';
// config/main-local.php for advanced app
if (!YII_ENV_TEST) {
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
'generators' => [ // here
'crud' => [ // generator name
'class' => 'yii\gii\generators\crud\Generator', // generator class
'templates' => [ // setting for our templates
'yii2-adminlte3' => '@vendor/hail812/yii2-adminlte3/src/gii/generators/crud/default' // template name => path to template
]
]
]
];
}