rakibtg rakibtg - 1 year ago 117
reST (reStructuredText) Question

No body data found in Laravel 5.3 with PUT request

Here is my route to update the contacts.

Route::put( 'contact-type/{id}', 'ContactTypeController@update' );

Here is the controller to test if the request was there with the PUT request.

public function update(Request $request, $id)
return response()->json([ 'id' => $id, 'req' => $request->all() ]);

When i send a request using postman, the request is null!

enter image description here

Is the body payload is not allowed in laravel PUT requests? Or how we send additional data in a PUT request?

Answer Source

ahw just change from form-data to x-www-form-urlencoded

Screen Shot

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download