cakephp friendship between users Linking models together
问题 What I need: A facebook-like friendship system. User (A) sends a requests for a friendship with User (B) User (B) confirmes the request User (A) and User (B) are friends now My problem: I'm confused how to work this out. I read a lot on the internet but it did not really helped me... My Questions: What kind of link is it in CakePHP? Is it hasAndBelongsToMany? Or hasMany? Or ...? How do I realise it in the datebase correctly? How do I link it in the model? What I already did: Table: users Name