Skip to content
Advertisement

Tag: updatemodel

Eloquent – Update eloquent relations with foreach loop

I have a controller function to send multiple devices for repair (essentially an update request against multiple existing devices_repairs records). When I try to retrieve the devices from the devices table alongside the repair details (Devices table, devices_repairs table), the records are retrieved but when I try to update the values the update request doesn’t save the new data. This

Advertisement