sowork/yauth

laravel rbac package

Maintainers

Details

github.com/sowork/yauth

Source

Issues

Installs: 27

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:laravel-package

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

This package is not auto-updated.

Last update: 2024-04-28 01:34:46 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调用