I am trying to update several rows of a table, for now I have only managed to update the first row and the rest is not updated.
foreach ($request->recibido as $key => $value) {
$cont = Contenido::where('id_envio','=',$id)->first();
$data = array($cont->recibido = $value);
$cont->update($data);
}
I'm working with laravel 5.5, try changing the first one for get () but it tells me that the update method does not exist.