This article is 13 years old
The content here might be outdated as technology and best practices evolve quickly. While the concepts may still be valuable, please verify the information against current documentation and standards.
CakePHP Basics Tutorial - Part 4
Overview
In this tutorial I will show you the power of associations in cakePHP. With associations you can link up your models and get related data when you fetch results from one model.
In this example I’ll show you how to create an association between a User and a Product.
In this tutorial I’ll be covering
-
Explain and create associations between models
-
Create an add form for the Products
-
Fetch data from one model and get the associated data for free
This part is the follow-up on what we have seen in CakePHP Basics Turorial - Part 3.
Let me know if you enjoyed it! Happy coding!
About the Author
👋 Hi, I'm Frederik Jacques, a passionate iOS developer and entrepreneur with over a decade of experience building innovative mobile applications.
I love creating apps that solve real problems and bring joy to users. From educational tools to creative meme makers, I'm always exploring new ways to blend technology with user experience. When I'm not coding, you'll find me sharing insights about iOS development, app monetization, and the indie developer journey.