Welcome Guest, Not a member yet? Register   Sign In
What's the best approach to access related data in CodeIgniter 4?
#1

As a beginner in CodeIgniter 4 and MVC, I am struggling to design a Model that includes information from two tables - Projects and Hours. I have created a basic Project Model, but I want to include hours associated with each project. I have set up my database using Primary and Foreign Keys, but I am unsure of the best approach to access the hours information.

Should I create a separate Hours Model or add a method to my Project Model that queries the Hours table? What is the recommended best practice for this situation?
Reply


Messages In This Thread
What's the best approach to access related data in CodeIgniter 4? - by GerishSonya - 04-19-2023, 10:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB