dimanche 23 octobre 2016

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?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire