Laravel, authorizeResource, This action is unauthorized.« Wróć do listy pytań
policy not working?
|
▲ ▼ |
Check parametrs of controller, if you see
public function show($id) then change if to
public function show(User $user) . It’s required by Policy controller and their parameters
public function view(User $user,User $model) – as you see it’s using objects, not ID’s. |