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
Let me know if you enjoyed it! Happy coding!