How to send data from a form with the put method?

0 like 0 dislike
7 views
I have a template edit.blade.php to edit a post. send it to the controller this form
{!! Form::model($post, ['route' => ['posts.update', $post->id], 'method' => 'put']) !!}

need to send a put. Tried to write a hidden input with the put method.
after doing submit just a white screen appears. In the console writes that he was poisoned by post.

a function in the controller like this.
public function update(Request $request, $id)

router like this
Route::resource('posts', 'PostController');

use larval 5.4
by | 7 views

2 Answers

0 like 0 dislike
after doing submit just a white screen appears. In the console writes that he was poisoned by post.
In the browser forms are sent either using the "GET" or "POST". The rest of the behavior is "emulated" at the level of the framework. Read more about how to specify a method by which the form is submitted, you can read in the documentation for Laravel.
by
0 like 0 dislike
In the console will not be written PUT
\rhttps://laravel.com/docs/5.6/routing#form-method-s...

Make a POST request with
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked Aug 5, 2019 by SZV
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked Apr 3, 2019 by Jhon_Light
110,608 questions
257,186 answers
0 comments
33,652 users