There is a html code

<form method="post" action="/addComment" class="comments-add-area-entry"> <div class="comments-add-area-entry-top"> <div class="input"> <label>Π’Π²Π΅Π΄ΠΈΡ‚Π΅ Π’Π°ΡˆΠ΅ имя</label> <input type="text"> <div class="clearfix"></div> </div> <div class="input"> <label>Π’Π²Π΅Π΄ΠΈΡ‚Π΅ Π’Π°Ρˆ e-mail</label> <input type="text"> <div class="clearfix"></div> </div> <div class="input"> <label>Π’Π²Π΅Π΄ΠΈΡ‚Π΅ Π’Π°Ρˆ ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ</label> <textarea></textarea> <div class="clearfix"></div> </div> <div class="input"> <button><i class="fa fa-commenting"></i>Π”ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ</button> </div> </div> </form> 

And controller

 public function addComment() { echo "hello world"; } 

The fact is that when I go to the address, everything is given out normally, and when I go through the form I get:

TokenMismatchException in VerifyCsrfToken.php line 53:

    1 answer 1

    You need to insert a CSRF token into the form

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

    and if you have a blade

     {!! csrf_field() !!}