Skip to main content
Laravel Bug Hunt Hard +35 XP

CSRF Missing

This form submits but gets a 419 error.

LaravelFind the bug
1<form method="POST" action="/posts">
2 <input name="title">
3</form>
The bug is on line 1

Select the correct fix

Show answer and explanation

Answer: Add @csrf directive inside the form

Laravel requires a CSRF token in all POST forms. @csrf generates a hidden input with the token.

Hint: 419 is Laravel's CSRF token mismatch error.

What this challenge tests

Bug Hunt in Laravel: csrf, security.

Related challenges