Skip to content

getPermissionNames() not working #2465

Answered by erikn69
rretzko asked this question in Q&A
Discussion options

You must be logged in to vote

It is not the same

public function getPermissionNames(): Collection
{
return $this->permissions->pluck('name');
}

auth()->user()->roles()->with('permissions')->get(); // via roles permissions 
auth()->user()->permissions()->get(); // direct permissions

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rretzko
Comment options

Answer selected by rretzko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants