分享 / 0 / 1 / 创建于 3年前
Laavel6以前的办法不行了,试过好几次一直不行,谁有代码借一下
在 app/Exceptions/Handler.php 中拦截错误?
app/Exceptions/Handler.php
public function register() { $this->renderable(function (HttpException $e) { if ($e->getMessage() === 'CSRF token mismatch.') { return .... // 自定义响应 } }); }
我要举报该,理由是:
在
app/Exceptions/Handler.php
中拦截错误?