Cannot use @can or auth()->user()->can() function #1971
Unanswered
charlottedrb
asked this question in
Q&A
Replies: 2 comments
-
Duplicate of #1955, The gate is tested, and i can't replicate this behaivor, laravel-permission/tests/GateTest.php Lines 40 to 53 in 08cc9bd It would be very helpful if someone make a minimal laravel application on fresh install, where problem is demonstrated or at least a failing test, example: IssueTest |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm trying to set up a permission and role management on a Laravel 8 / php 8 projet with Spatie.
I'm having an issue with the "can" directive in Blade and in Laravel.
The "can" always return "true" so there isn't any control on the user's permissions.
The only solution I had now, is to use the hasPermissionTo method and to overwrite the natives Middleware of Spatie package.
If anyone already had this type of problem, thanks in advance for your help !
Beta Was this translation helpful? Give feedback.
All reactions