Model: User
public function posts(){
return $this->hasMany(\App\Post::class);
}
public function follows() { //seguidos, a que usuarios sigue este usuario
return $this->belongsToMany(User::class, 'followers', 'user_id', 'followed_id');
}
Model: Post
public function user(){
return $this->belongsTo(User::class);
}
With this: \Auth::user()->follows
gives me all the users that I follow, but as I do now see the posts of those users that I follow, as ago for me to load also the relationship of the posts that I already have in the model.
Thanks in advance.