I'm trying to update data, however I get:
Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException
My route:
Route::put('animalperdido/{id}', 'AnimalPerdidoController@update');
My role:
public function update(Request $request, $id)
{
$animalPerdido = AnimalPerdido::findOrFail($id);
$animalPerdido->update($request->all());
return $animalPerdido;
}
In postman I'm trying to pass in the header the id and in the body a key that should be changed.