Jo Micheal
Published in : 2021-04-10
I am facing Error 419 while creating a POST request in the form
I am using this Form code
<form method="POST" action="{{url('insert')}}"> <div > <input type=text name=name placeholder="please Enter your name" > </div> <input type=submit value="send"></form>
and on the web.php
<?php Route::post('insert', [main::class, 'insert']);?>
How to solve this, please?
Join our community and get the chance to solve your code issues & share your opinion with us
Sign up Now
Mohamed Atef Date : 2021-04-10
Best answers
51
Best answers
51
Hello again Mr.Jo this issue is because you are missing a input of the CSRF token all you need to do is adding the CSRF with one of these ways
First way
Second way
Hope you be able to understand the idea of CSRF
You can read about it in the Laravel protection //laravel.com/docs/8.x/csrf
Best regards
Jo Micheal Date : 2021-04-10
WOW thank you Mohamed I really missed this part
Great job!