SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘location_id’ cannot be null
Check the below code I have converted this from web code , almost similar code is working on web now when I converted it into api to integrate it into app, I am facing issue: “error”: “SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘location_id’ cannot be null” Even tought I have set the Column ‘location_id’ to null and set it’s default value to 0 And most weird thing is that it’s creating an entry is same table as I am passing by default 1 to location_id and it shows in entry as well then how can I receive this constraint error Please help me to resolve this issue