Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bajramemini authored Jul 5, 2019
1 parent 1cdbaf5 commit 5813a58
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,26 @@ public function tools()
}
```

If you want to hide the tool from certain users, you can write your custom logic for the ability to see the tool:

```php
// in app/Providers/NovaServiceProvider.php

// ...

public function tools()
{
return [
// ...
(new \Eminiarts\NovaPermissions\NovaPermissions())->canSee(function ($request) {
return $request->user()->isSuperAdmin();
}),
];
}


```

Finally, add `MorphToMany` fields to you `app/Nova/User` resource:

```php
Expand Down

0 comments on commit 5813a58

Please sign in to comment.