Open MohamedMaher5 opened 3 years ago
Hi i think your column category_id
in ads
table does not have a nullable criteria and when the record is created this column is empty.
Make that column NULLABLE and the problem goes away.
I already select category from field and I don't want make category_id nullable
same issue with belongs to relation
After tracking the creation behavior in case of using belongs to relation you should enable nullable option for your relationship foreign key as it's attached after the model creation.