1. Go to this page and download the library: Download jsyqw/layui-gii 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/ */
jsyqw / layui-gii example snippets
...
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
// uncomment the following to add your IP if you are not connecting from localhost.
//'allowedIPs' => ['127.0.0.1', '::1'],
'generators' => [
'crud' => [ //生成器名称
'class' => 'Jsyqw\Layuigii\crud\Generator',
'templates' => [ //设置我们自己的模板
//模板名 => 模板路径
'layuiCrud' => '@vendor/layui-gii/src/crud/default',
]
],
'model' => [ //生成器名称
'class' => 'Jsyqw\Layuigii\model\Generator',
'templates' => [ //设置我们自己的模板
//模板名 => 模板路径
'layuiModel' => '@vendor/layui-gii/src/model/default',
]
]
],
];
...