I have the following function:
public function alterar($id)
{
$produto = Produto::find($id);
$params = $request->all();
$produto->fill($params)->save();
return redirect()->action('ProdutoController@index');
}
however every time I change a product, a new one is added to the database (a new updated copy) and the old one is still there, so what is happening is a copy and not actually updating that product?