VerifyCsrfToken.php 第 68 行中的 TokenMismatchException:Laravel 5.4

TokenMismatchException in VerifyCsrfToken.php line 68: Laravel 5.4

发送post请求时发送查询post时发生错误 VerifyCsrfToken.php 第 68 行

中的 TokenMismatchException
     <form action = "contact" method = "POST">
         Name <input type = "text" name ="param">
         Текст <textarea name = "" id = "" cols = "30" rows = "10></textarea> 
          <input type="submit" value = "submit">
     </form>

尝试在您的表单中添加 {{ csrf_field() }}

<form>
  {{ csrf_field() }}
  <input >
  ...
</form>

这将为您插入 csrf 令牌的隐藏字段

您的问题是您没有为 csrf 发送令牌,在 laravel 中为此特殊方法提供 {{csrf_field()}} 你可以在这里详细阅读 laravel csrf

<form action = "contact" method = "POST">
     {{csrf_field()}}
     Name <input type = "text" name ="param">
     Текст <textarea name = "" id = "" cols = "30" rows = "10></textarea> 
      <input type="submit" value = "submit">
 </form>