Reputation: 137
I am submitting a POST request from form and it shows 419 | page expired.
Blade.php:
<form action="<?php echo action('TestsController@store'); ?>" method="post">
Route:
Route::resource('tests', 'TestsController');
Controller:
public function store(Request $request) {
echo "something something";
}
Upvotes: 12
Views: 16283
Reputation: 4959
in my case another admin user logged in in my custom Admin panel with OTP
and so he cant login with this new laravel/ui auth login/register default page
Upvotes: 0
Reputation: 11
In my case, I have solved the problem by setting SSL for my domain. I've tried all the solution, but they didn't work. Then I set the SSL for the domain and it solved the problem.
Upvotes: 0
Reputation: 466
As Levente said, first try by putting the @csrf in the form. If that doesn't work, see this thread. It is a duplicate of this issue.
Upvotes: 0
Reputation: 795
Laravel has built-in CSRF protection. Check out the official documentacion.
Add @csrf
to you form.
<form action="<?php echo action('TestsController@store'); ?>" method="post">
@csrf
</form>
Upvotes: 16