Skip to content

Commit

Permalink
Merge pull request #55 from yajra/fix-lazy-loading
Browse files Browse the repository at this point in the history
fix: lazy loading issue with permissions
  • Loading branch information
yajra authored Dec 5, 2024
2 parents a743287 + f75f0dd commit 5b5d8d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Traits/InteractsWithPermission.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ public function revokeAllPermissions(): int
*/
public function getPermissions(): array
{
$this->loadMissing('permissions');

return $this->permissions->pluck('slug')->toArray();
}
}

0 comments on commit 5b5d8d5

Please sign in to comment.