Skip to content
Advertisement

laravel array update multiple rows with diffrent ids

i am stuck in when i update multiple array value then each time update same value in diffrent ids like i have three fields like email,alert_level and select in select dropdoewn depends on alert_level choose option so now i want update all three fields but in stuck

here is my code

JavaScript

here is this type of error SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘0’ in ‘field list’ (SQL: update fraud_alerts set 0 = vandan@gmail.com, updated_at = 2020-10-15 10:20:32 where id in (228))

here is dd of $requestData

JavaScript

]

here is model

JavaScript

Advertisement

Answer

The below code update data individual entries:-

JavaScript

the problem with your code is you are update data in both entries but the data is the same for both rows.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement