Closed FupingQiu closed 4 years ago
参考资料:
https://learnku.com/articles/41853
Laravel使用policy完成用户授权: https://blog.csdn.net/zhouyuqi1/article/details/77574015 1.策略类和模型关联即是在policy中编写我们的策略方法 class PostPolicy{ use HandlesAuthorization; 2.'App\Post' => 'App\Policies\PostPolicy', //注册Post的policy 3.$this->authorize('update',$post); ////////////////////策略判断
Laravel 常见错误:https://www.jianshu.com/p/dc7e490835f9 Request 文件中的false改成true public function authorize(){ return true; }
经验证,处理如下操作可以fix "This action is unauthorized"问题。 Request 文件中的false改成true public function authorize(){ return true; }
[Vue warn]: Error in v-on handler (Promise/async): "Error: Request failed with status code 403"
found in
---> at resources/js/pages/okrs/index.vue