Skip to content

基于 Laravel, Layui 构建的 RBAC 后台管理系统。

Notifications You must be signed in to change notification settings

beichuan-todo/laravel-layui-admin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel-layui-admin

基于 Laravel, Layui 构建的 RBAC 基础后台管理系统。

如果你想要 vue 版本的后台系统, 移步 moell/mojito

截图

laravel-layui-admin.png

要求

  • 最低支持 laravel5.8 , 支持 6.0

安装

首先安装laravel, 并且确保你配置了正确的数据库连接。

composer require moell/laravel-layui-admin

然后运行下面的命令来发布资源和配置:

php artisan laravel-layui-admin:install

config/auth.php中添加相应的 guards 和 providers,如下:

    '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,
    ];
}

执行数据迁移,数据填充

php artisan migrate

php artisan db:seed --class="Moell\LayuiAdmin\Database\LayuiAdminTableSeeder"

登录

url: http://localhost/admin/login

email: admin@gmail.com

password: secret

依赖开源软件

  • Laravel
  • Layui
  • spatie/laravel-permission

打赏

交流

QQ群:339803849

微信:扫码后拉入群

License

Apache License Version 2.0 see http://www.apache.org/licenses/LICENSE-2.0.html

About

基于 Laravel, Layui 构建的 RBAC 后台管理系统。

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 44.7%
  • HTML 43.2%
  • JavaScript 11.6%
  • CSS 0.5%