laravel-nova-permission icon indicating copy to clipboard operation
laravel-nova-permission copied to clipboard

Resource disappears

Open simona2017 opened this issue 5 years ago • 1 comments

I have installed everything as instructed, create an Equipment Role and Assigned a permission named create equipment, then assigned it to the user who is logged in. When I add the following code to the

Equipment Resource

class Equipment extends Resource
{
  use \Insenseanalytics\LaravelNovaPermission\PermissionsBasedAuthTrait;
  public static $permissionsForAbilities = [

      'create' => 'create equipment',
    ];

my resource disappears from the nav bar. Am I doing something wrong?

Thanks so much

simona2017 avatar Jan 14 '19 23:01 simona2017

@simona2017 you would also need to add the view permissions for you to be able to view the resource in the navbar. If you wish to grant all abilities to users who have the create equipment permission, you can use 'all' => 'create equipment'

paras-malhotra avatar Feb 11 '19 12:02 paras-malhotra