My present table structure :
I just added the "product_name" column recently & tried to do the same PUT which has been successfully adding values to the table earlier. For some reason, the newly added product_name field is not getting updated(Rest all columns are getting the values through the same PUT request).
Am i missing any steps after adding a new column to the existing tables, after which it could accept values via API PUT ? I added this new column from the Structure tab
URL : MY URL
headers: {HttpHeaders.contentTypeHeader: 'application/json'},
body: json.encode({id: null, quantity: 1.0, product_id: 113, product_name: cumin, user_id: 72, options: []})
2
Answers
you need to add that column in your model.
or if you don’t want to write fillable then simply replace this line with
Please update your $fillable array in your modal.