I'm using Laravel Passport in my API project. When I create a custom Request with php artisan make:request
and use it in a resource controller protected with the middleware auth:api,
my custom request throws an AuthorizationException and all I can see is 403 Forbidden. When I don't use my custom request, everything is working as expected. I'm using Laravel version 5.8.
Asked
Active
Viewed 266 times
0

no0by5
- 632
- 3
- 8
- 30
-
1I guess this has been answered here: https://stackoverflow.com/questions/47008821/laravel-passport-api-status-code403-forbidden – Jose Henrique Felipetto Mar 05 '19 at 22:23
-
I do not know how this should solve my problem – no0by5 Mar 06 '19 at 11:18
-
In your custom request file, return true from authorize() method – Abu Sayem Mar 06 '19 at 18:27
-
That's working. Thanks! – no0by5 Mar 06 '19 at 18:45