Laravel forcing POST routes into GET
Router:
Route::post('/submit/{id}', function() {
return 'Hello World';
});
HTML:
<form method="POST" action="/submit/">
The above returns a ‘Page has Expired Due to Inactivity’.
It also changes the url to ‘http://127.0.0.1:8000/submit/$id’
It looks like Laravel is trying to force the POST into a GET.
Why is this happening?
And no, I can’t just make it a GET.
from Laravel Questions and Answers https://laravelquestions.com/laravel/laravel-forcing-post-routes-into-get/
via Lzo Media
No comments:
Post a Comment