laravel -- error: TokenMismatchException

When submitting a POST request, the following error is encountered:

 

Solution:

When submitting the form by POST, add the global helper function csrf_token that comes with laravel

<input type="hidden" name="_token" value="<?php echo csrf_token(); ?>" />

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324586688&siteId=291194637