I have some tables in my db between them are
post_has_categoria
post
categoria
In My Models I have the Category.php and the Contest.php where should sql be responsible for post_has_category?
I have some tables in my db between them are
post_has_categoria
post
categoria
In My Models I have the Category.php and the Contest.php where should sql be responsible for post_has_category?
Given the assumption that this sql / method would check "there is category in post?", this same sql / method would be in the Post class following the IE (information expert) standard - who has / knows the information it should perform the task. In this case, only the Post class knows if it has category.