Answer the question
In order to leave comments, you need to log in
How to send data with form put method?
i have edit.blade.php template to edit post. I send it to the controller with this form
{!! Form::model($post, ['route' => ['posts.update', $post->id], 'method' => 'put']) !!}
must be sent using the put method. Tried writing hidden inputs with put method.
after I do submit just a white screen appears. In the console it says that it was poisoned by the post method.
function in the controller.
public function update(Request $request, $id)
Router like this
Route::resource('posts', 'PostController');
I am using laravel 5.4
Answer the question
In order to leave comments, you need to log in
after I do submit just a white screen appears. In the console it says that it was poisoned by the post method.In the browser, forms are submitted using either the "GET" or "POST" method. The rest of the behavior is "emulated" at the framework level. You can read more about how to specify the method by which the form is submitted in the Laravel documentation .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question