Answer the question
In order to leave comments, you need to log in
Why doesn't the CSRF token match?
Hello! For some reason, when submitting a form in a Laravel application, I get a TokenMismatchException. How to solve this problem?
Here is the view with the form itself
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Добавление домена</div>
<div class="panel-body">
<form method = "POST">
{{ csrf_field() }}
<label>
Имя домена
<input name = "content">
</label>
<br>
<input type = "submit" value = "Add">
</form>
</div>
</div>
</div>
</div>
</div>
@endsection
<form method="POST"><label>
Имя домена
<input name="content"></label> <br> <input type="submit" value="Add"></form>
Answer the question
In order to leave comments, you need to log in
<input type="hidden" name="_Token" value="{{ csrf_token() }}">
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question