Policy not being called ((
i have tried all variants: with guessPolicyName, and manually registered policies...
in all cases policy is not even called and AccessDeniedHttpException This action is unauthorized is thrown...
Any ideas?
Policy not being called ((
i have tried all variants: with guessPolicyName, and manually registered policies...
in all cases policy is not even called and AccessDeniedHttpException This action is unauthorized is thrown...
Any ideas?
The problem was in authorization it self because policies doesnt works with guest users. So i decided to use middleware (in my particular case it is better than custom service provider because i have several types of guest users)
i wrap my guests routes with this middleware
GuestClient is model it should extends from Illuminate\Foundation\Auth\User