Not getting updated values in table columns #445
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @Nav-Chouhan! I see many issues in your code;
Internally, some of this things would make the relations to be saved automatically, you need extra setup if you don't follow the standards. I think the issue may be in the definition of the belongsTo relations, since you're not following the standard, you must set the column name there BUT, it's highly recommended to follow the standards, instead of fixing this inconsistencies every time they happen, otherwise you'll keep on having more problems in the future. |
Beta Was this translation helpful? Give feedback.
-
@promatik Thanks for highlighting the bugs. I have changed the code according to the standards. Now of fine. Thanks Again :) |
Beta Was this translation helpful? Give feedback.
Hi @Nav-Chouhan!
I see many issues in your code;
_id
, socity
»city_id
,state
»state_id
,country
»country_id
.Internally, some of this things would make the relations to be saved automatically, you need extra setup if you don't follow the standards.
I think the issue may be in the definition of the belongsTo relations, since you're not following the standard, you must set the column name there
$this->belongsTo(Categories::class, 'category');
BUT, it's highly recommended to follow the standards, instead of fixing this inconsistencies e…