I have Users, Posts and an association table of Friends to tie the users together.

For a single user, I want to get all Posts that belong to the users who are friends with that user.

```
//user model
function posts() {
    return $this->hasMany('Post');
}
function friends() {
    return $this->belongsToMany('User', 'friends', 'friend_id', 'user_id');
}

//post model
function user() {
    return $this->belongsTo('User');
}

```

If someone could point me in the right direction, that would be great