Laravel 访问控制列表

v2.0.2 2023-03-06 12:22 UTC

This package is not auto-updated.

Last update: 2024-09-17 15:26:18 UTC


README

基于角色的 Laravel 访问控制

复制迁移和种子文件,并使用迁移和种子。

为 acl 应用添加路由中间件 app/Http/Kernel.php 'acl' => \Laraturka\Acl\AclMiddleware::class,

在 Providers 中添加 AclPolicy 引用。app/Http/Providers/AuthServiceProvider.php

User::class => AclPolicy::class,

使用中间件创建路由组

Route::group(['prefix'=>'admin', 'middleware' => ['auth','acl','nocache']], function() {

//what ever you want to route

});