diff --git a/src/Traits/InteractsWithPermission.php b/src/Traits/InteractsWithPermission.php index c3856ba..d9ceb58 100644 --- a/src/Traits/InteractsWithPermission.php +++ b/src/Traits/InteractsWithPermission.php @@ -173,6 +173,10 @@ public function revokeAllPermissions(): int */ public function getPermissions(): array { + if (! $this->relationLoaded('permissions')) { + $this->load('permissions'); + } + return $this->permissions->pluck('slug')->toArray(); } }