JaggyGauran

Freelance developer, and designer

CakePHP Polymorphic Associations

So I recently just found out about polymorphic relationships and let me tell you, it's amazing. It saves a lot of fields and just feels right. Anyways, implementing it in CakePHP 2 is quite easy. Let's say we have an Image which belongs to Employee and Client, here's how the structure would…

Read this article