2017 © Pedro Peláez
 

library shaka-auth-for-laravel

cty shaka rbac management system

image

worden/shaka-auth-for-laravel

cty shaka rbac management system

  • Friday, December 23, 2016
  • by wordenfan
  • Repository
  • 2 Watchers
  • 1 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

概述

This is a shaka-auth for test inspire by Zizaco/entrust, (*1)

安装方法

composer require "worden/shaka-auth-for-laravel:1.0.x-dev"

使用说明

kernel.php的$routeMiddleware增加中间件, (*2)

'shakaAuth' => \Cty\ShakaAuth\Middleware\ShakaAuth::class,

user的调用方法, (*3)

$user = User::where('id',1056)->first();
$res = $user->roleList();
$res = $user->hasRole([25,26]);
$res = $user->attachRole(27);
$res = $user->detachRole(27);
$res = $user->canDo([12,'manage_posts3']);
$res = $user->basePermission()->menu();
$res = $user->basePermission()->func();

role的调用方法, (*4)

$role = Role::where('id',25)->first();
$res2 = $role->attachPermission(17);
$res2 = $role->detachPermission([18]);
$res2 = $role->userList();
$res2 = $role->hasPermission(['manage_posts2','manage_posts3']);
$res2 = $role->permissionList();
$res2 = $role->basePermission()->menu();

The Versions

23/12 2016

dev-master

9999999-dev

cty shaka rbac management system

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by worden

20/12 2016

1.0.x-dev

1.0.9999999.9999999-dev

cty shaka rbac management system

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by worden

23/11 2016

v1.0.1

1.0.1.0

cty shaka rbac management system

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by worden