Reputation:
When sending a post request When you send a query post, an error occurs TokenMismatchException in VerifyCsrfToken.php line 68
<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>
Upvotes: 0
Views: 2353
Reputation: 838
Your problem is that you do not send token for csrf, in laravel provided for this special method {{csrf_field()}}
you can read about it in detail here 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>
Upvotes: 0
Reputation: 527
try to add inside of your form {{ csrf_field() }}
<form>
{{ csrf_field() }}
<input >
...
</form>
This will insert the hidden field for csrf token for you
Upvotes: 1