Home  >  Article  >  Web Front-end  >  How to handle exceptions displayed when post submits data

How to handle exceptions displayed when post submits data

一个新手
一个新手Original
2017-10-01 07:45:283241browse


When post submits data, it displays as follows:

The page has expired due to inactivity. 
Please refresh and try again

This is due to this requirement in the laravel framework: any HTML form that points to the POST, PUT or DELETE route in the web Requests should all contain a CSRF token, otherwise, the request will be rejected.

eg:

<form method="POST" action="/profile">
{{ csrf_field() }}    ...</form>

The above is the detailed content of How to handle exceptions displayed when post submits data. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn