Did you wrap everything properly in a form tag, like so:
<form method="POST" action="...">
{{ csrf_field() }}
<input ...>
// ...more inputs
<button type="submit">Submit</button>
</form>
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hey,
I have Laravel 5.4 and a problem whit the post from a form. When I click the submit button, then I have a error:
"in VerifyCsrfToken.php (line 68)"
My form are look:
{{ csrf_field() }}<input type="text" name="name" value="{{ old('name') }}" required >
<input type="password" name="password" value="{{ old('password') }} required>
My route (web.php): Route::get('user/registration', 'Frontend\Usersystem\RegistrationController@index'); Route::post('user/registration', 'Frontend\Usersystem\RegistrationController@postRegistration');
What is the problem? :o... Thanks for your help <3.
Sorry, I forgot to insert the complete HTML tag.
This is my HTML Code and I became the error:
<form method="POST" action="{{ URL::to('/user/registration') }}">
{{ csrf_field() }}
<input type="text" name="name" value="{{ old('name') }}" required >
<input type="password" name="password" value="{{ old('password') }} required>
</form>
Please or to participate in this conversation.