當我提交表單時,我收到錯誤:VerifyCsrfToken.php 第 67 行中的 TokenMismatchException:錯誤我已經添加了令牌變量:<input name="_token" value="erlhterehewfhfuetDYTewruhfekrgf" type="hidden">還有其他解決方案嗎?
2 回答

qq_笑_17
TA貢獻1818條經驗 獲得超7個贊
csrf 令牌應放在表單中。這可以通過以下方式實現:
@csrf
或者
{!! csrf_field() !!}
例子:
<form method="POST" action="/profile">
@csrf
<input type="text" name="example" />
</form>

茅侃侃
TA貢獻1842條經驗 獲得超21個贊
<form method="POST" action="/users">
@csrf
<input type="text" name="email" />
</form>
如需更多說明。請點擊這里https://www.resourcifi.com/blog/whats-new-laravel-6-auth0/。
- 2 回答
- 0 關注
- 148 瀏覽
添加回答
舉報
0/150
提交
取消