neposoft/field-acl

一个用于支持模型字段访问控制的Laravel扩展包

1.0.1 2016-03-09 22:34 UTC

This package is not auto-updated.

Last update: 2024-09-14 19:04:00 UTC


README

如何使用此扩展包

  • 在composer中添加依赖项 composer require neposoft/field-acl

  • 在config/app.php中添加服务提供者
    Neposoft\FieldAcl\FieldAclServiceProvider::class

  • 运行 php artisan vendor:publish 以发布配置文件、视图和迁移

  • 在config/fieldAcl.php中添加您想要管理的类,在class下

    'classes' => [
       \App\User::class
    ]
- also change the roles and other parameters according to your needs. 

- In your model, use FieldAcl trait: 

         use    Neposoft\FieldAcl\FieldAcl;

- Open the browser at `/permissions` and you are ready to manage the permissions for the groups that you defined in config.

![Screenshot](http://i.imgur.com/FUp41FM.png)

If any trouble, don't hesistate to open issues :)