neposoft / fieldAcl by neposoft

A laravel package to support acl on fields of your models
97
6
4
Package Data
Maintainer Username: neposoft
Maintainer Contact: bvsapkota@hotmail.com (Vijay Sapkota)
Package Create Date: 2016-03-06
Package Last Update: 2016-09-08
Language: PHP
License: MIT
Last Refreshed: 2024-04-27 03:06:51
Package Statistics
Total Downloads: 97
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 6
Total Watchers: 4
Total Forks: 3
Total Open Issues: 0

Laravel ACL on field level

How to use the package:

  • Add a dependency to your composer composer require neposoft/field-acl

  • Add the service provider in config/app.php Neposoft\FieldAcl\FieldAclServiceProvider::class

  • php artisan vendor:publish to publish config files, views and migrations

  • Add class that you want to manage in config/fieldAcl.php , inside 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 :)