sowork/yauth

Laravel RBAC 包

维护者

详细信息

github.com/sowork/yauth

问题

安装: 27

依赖: 0

建议: 0

安全: 0

星标: 0

观察: 2

分支: 0

开放性问题: 0

类型:laravel-package

v0.1 2018-02-06 06:26 UTC

This package is not auto-updated.

Last update: 2024-09-29 03:52:45 UTC


README

larave5 RBAC权限管理,多表用户权限判断

安装

  • 使用 composer 安装 composer require sowork/yauth dev-master
  • 注册: 在 config/app.php 文件中 providers 数组中注册提供者 Sowork\YAuth\YAuthServiceProvider::class,,在 config/app.php 文件 aliases 数组中注册 'YAuth' => Sowork\YAuth\YAuthServiceProvider::class,

资源发布

  • 默认 php artisan vendor:publish 会发布配置文件和数据库迁移文件,单独发布如下。
  • 数据库表迁移 php artisan migrate
  • 如果您不想使用默认yauth的数据库表,或者想基于yauth表进行修改,需要在 AppServiceProviderregister 方法中调用 YAuth::ignoreMigrations(); 使用 php artisan vendor:publish --tag=yauth-migrations 导出默认迁移表
  • 配置文件发布 php artisan vendor:publish --tag=yauth-config

中间件

API 调用