PHP code example of wangdong / laravel-easyui
1. Go to this page and download the library: Download wangdong/laravel-easyui 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/ */
wangdong / laravel-easyui example snippets
return [
// 路由配置
'route' => [
'default' => 'laravel/easyui',
'prefix' => 'admin', // TODO 留空时需要屏蔽默认的首页路由
'middleware' => [],
],
// 复制文件(支持闭包)
'publishes' => function () {
return [
module_path('laravel/easyui', 'config') => base_path('config'),
module_path('laravel/easyui', 'database') => base_path('database'),
module_path('laravel/easyui', 'public') => base_path('public'),
];
},
// 命令配置(支持闭包)
'commands' => [
Module\Laravel\Easyui\Commands\Init::class,
Module\Laravel\Easyui\Commands\Migrate::class,
],
// 模块配置,可通过module_config方法获取
'modules' => [
// TODO 按照group_name/module_name格式配置(覆盖composer.json > extra.laravel-module.config)
'laravel' => [
'easyui' => [
'name' => '后台管理系统',
'theme' => 'metro',
'import' => [
'styles' => [],
'scripts' => [],
],
]
]
],
];
$app->middleware([
Illuminate\Session\Middleware\StartSession::class
]);
$app->configure('auth');
$app->configure('module');
$app->configure('session');
$app->bind(Illuminate\Session\SessionManager::class, function ($app) {
return $app->make('session');
});
$app->register(Illuminate\Cookie\CookieServiceProvider::class);
$app->register(Illuminate\Redis\RedisServiceProvider::class);
$app->register(Illuminate\Session\SessionServiceProvider::class);
$app->register(LaravelModule\ServiceProvider::class);