rezamalik15

Untitled

Oct 25th, 2023
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. public function boot(): void
  2. {
  3. Gate::define('manage-user', function($user){
  4. return $user->role == 'superadmin';
  5. });
  6.  
  7. Gate::define('isAdmin', function($user){
  8. return $user->role == 'admin';
  9. });
  10.  
  11. Gate::define('isSuperadmin', function($user){
  12. return $user->role == 'superadmin';
  13. });
  14. }
Advertisement
Add Comment
Please, Sign In to add comment