I have the following relation in my Users model
public function events($user_id)
{
return $this->find($user_id)->hasManyThrough('Event', 'Event_Member', 'user_id', 'id');
}
And the three tables
User
id|name|...
1 |bob |
2 |mike|
Event
id|name |location
1 |meeting|office
Event_Member
user_id|event_id|status
1 |1 |Owner
2 |1 |Guest
The hasManyThrough relationship gives me the information from the Event table, but I also need the status information from the pivot table, how can this be done?