search

Home  >  Q&A  >  body text

How to intercept errors and change the corresponding http response code in laravel?

Mine is a single-page website, and the page will obtain a csrf token when it is loaded for the first time, but this token will time out. When it times out, a "TokenMismatchException" error will be reported and the response code is 500. If Normal access is 200. Now I need to change the error response code of this TokenMismatchException to 509. What should I do?

给我你的怀抱给我你的怀抱2779 days ago456

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-05-16 16:54:44

    Exceptions/handler.php ----》 report

    reply
    0
  • Cancelreply