0
I’m trying to update data, but I get:
Symfony Component Httpkernel Exception MethodNotAllowedHttpException
My route:
Route::put('animalperdido/{id}', 'AnimalPerdidoController@update');
My job:
public function update(Request $request, $id)
{
$animalPerdido = AnimalPerdido::findOrFail($id);
$animalPerdido->update($request->all());
return $animalPerdido;
}
In Postman I am trying to pass in the header the id and in body a key that must be changed.
I use the angled on the frontend, I only use the Laravel to create the API
– veroneseComS
but I understood the problem
– veroneseComS