Skip to content

can() method with multiple guards doesn't work #2760

Closed Answered by parallels999
Vasiliy-Makogon asked this question in Q&A
Discussion options

You must be logged in to vote

Version 3.18.0 is installed.

Current version is v6.10.0

var_dump(Auth::guard()->user()->can('editor', 'api')); // try this change
var_dump(Auth::guard()->user()->checkPermissionTo('editor', 'api')); // ok - true

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@Vasiliy-Makogon
Comment options

@Vasiliy-Makogon
Comment options

@erikn69
Comment options

Answer selected by Vasiliy-Makogon
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants