Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

eddy1992's avatar

TokenMismatchException in VerifyCsrfToken.php line 46:

I dont know why I am facing this error. I am stuck :(

<form method="POST" action="{{URL::to('answer/store')}}" accept-charset="UTF-8" enctype="multipart/form-data"><input name="_token" type="hidden" value="{!! csrf_token() !!}">

What should I do

0 likes
1 reply
Ishatanjeeb's avatar

Use this one

<form method="POST" action="{{URL::to('answer/store')}}" accept-charset="UTF-8" enctype="multipart/form-data">
{!! csrf_field() !!}

Please or to participate in this conversation.