基於 Laravel, Layui 構建的 RABC 基礎後臺管理系統。php
若是你想要 vue 版本的後臺系統, 移步 moell/mojito
Github: https://github.com/moell-peng...html
Gitee: https://gitee.com/moell/larav...vue
首先安裝laravel, 而且確保你配置了正確的數據庫鏈接。laravel
composer require moell/laravel-layui-admin
而後運行下面的命令來發布資源和配置:git
php artisan laravel-layui-admin:install
在config/auth.php
中添加相應的 guards 和 providers,以下:github
'guards' => [ ... 'admin' => [ 'driver' => 'session', 'provider' => 'admin' ] ], 'providers' => [ ... 'admin' => [ 'driver' => 'eloquent', 'model' => \Moell\LayuiAdmin\Models\AdminUser::class, ] ],
在 app/Http/Kernel.php
中 $routeMiddleware 屬性添加路由中間admin.permission
和替換 auth 中間件:數據庫
class Kernel extends HttpKernel { protected $routeMiddleware = [ //'auth' => \App\Http\Middleware\Authenticate::class, 'auth' => \Moell\LayuiAdmin\Http\Middleware\Authenticate::class, ... 'admin.permission' => \Moell\LayuiAdmin\Http\Middleware\Authenticate::class, ]; }
執行數據遷移,數據填充apache
php artisan migrate php artisan db:seed --class="Moell\LayuiAdmin\Database\LayuiAdminTableSeeder"
登陸微信
url: http://localhost/admin/loginsession
email: admin@gmail.com
password: secret
QQ羣:339803849
微信:掃碼後拉入羣
Apache License Version 2.0 see http://www.apache.org/license...