Skip to content

一种 Laravel 异常上下文解决方案 | overtrue #109

@overtrue

Description

@overtrue

https://overtrue.me/laravel-exception-with-context/

异常时我们通常希望在用户测给一个友好的提示,但默认使用框架的异常处理方案是不 OK 的。
最近项目遇到一个情况,我们在遇到用户访问某个信息没有权限的时候,希望提示详细的原因,比如当访问一个团队资源时非成员访问的场景下会提示一个:您不是 [x...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions