Replies: 4 comments 5 replies
-
I have noticed the same thing and am facing the same problem. |
Beta Was this translation helpful? Give feedback.
-
You can still extend the
|
Beta Was this translation helpful? Give feedback.
-
@taylorotwell is there a particular reason you removed this in the documentation on this commit ? Just to be sure this is not about to be deprecated 😄 |
Beta Was this translation helpful? Give feedback.
-
This is really disappointing if it is being removed. Needing to specify for each method in the controller negates a big benefit of resource controllers. Without authorizeResource it feels better to manually specify each route and use middleware. This feels like a critical component of the idea of a "resource". |
Beta Was this translation helpful? Give feedback.
-
After upgrading to Laravel 11 I noticed that 11 version dropped documentation for resource authorization link to 10 version resource docs and in 11 version it does not exists
And as new version propose to use clean base controller, but we can still use
AuthorizesRequests
trait.But then
authorizeResource
method stops working, since it does have access tomiddleware
function anymoreSo maybe a new handy approach exist to set Policy on resource controller?
I know I can extend the base controller. But since the docs are removed I guess a new approach should exist?
Also I know I can add on each resource method, to check if user is authorized. But maybe we can do it more simpler?
Beta Was this translation helpful? Give feedback.
All reactions