Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Link users together
I am using the simpleauth package, with a single model User In my idea, I have 3 types of users :
doctor the familly user must be related to a patient user (and only 1 of course).
I tried to add an user_id property and change my Model_User with :
protected static $_belongs_to = array('user');
protected static $_has_one = array('user'); but the link doesn't work.
Any idea to do this with fuel PHP ? thx
I have created a new table "liaisons" with the patient_id and the familly_id to store the link
My new issue (
) is how to get the username of the linked user when I show all my users : $data = Model_User::find('all'); ?? thx
That depends on how you have defined your relations.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion