Laravel 5.1 框架返回状态拦截

Laravel 5.1 返回信息状态拦截


 

可以在app\Exceptions\Handler.php文件中修改,

 public function render($request, Exception $e)
{
    return parent::render($request, $e);
}

修改该方法,拦截错误,进行自定义处理。


 

posted @ 2018-11-28 16:58  学知无涯  阅读(266)  评论(0编辑  收藏  举报