#Possible bug on authorizeResource

2 messages · Page 1 of 1 (latest)

fallen geyser
#

src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php has function called authorizeResource which seems to be built around the method middleware which exists in src/Illuminate/Routing/Controller.php
At some point the middleware has changed into static method by implementing src/Illuminate/Routing/Controllers/HasMiddleware.php which is no longer compatible with the authorization trait.
I dont see this in the docs but i feel like the authorization trait should be modified to use the static middleware or we should extend the base controller.

tired viper
#

L11 doesn't extend any controller with authroization traits anymore, because it's not the recommended approach. What you're describing is what I'd call legacy, and I don't see a reason that should be changed. But you're welcome to make a PR to the framework