Skip to content
Advertisement

Update multiple row with insert new data in laravel

I am new to Laravel, here my existing fields are getting updated but unable to insert a new row, when users checks for a new category it should be added as a new row in the database.

JavaScript

check boxes are categories

Advertisement

Answer

Update the foreach loop as follow

JavaScript

also, check that in your AppEwasteItem model have $fillable array and it has the element ‘product_id’

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