title: Multiple relations (pivot) in Laravel
body: <p>I have a problem with related models.</p>
  
  <p>There are three models. User, PostType (music, animals) and Post.</p>
  
  <p>A user can select the posttypes he wants to see. So I created a pivot-table posttype_user. 
  Now I can save the selected postTypes binded to a user.</p>
  
  <pre><code>// User model
      public function postTypes()
      {
          return $this-&gt;belongsToMany(PostType::class);
      }
  
  // PostType model
      public function users()
      {
          return $this-&gt;belongsToMany(User::class);
      }
  </code></pre>
  
  <p>The Post model has a foreign key with postType_id. And this relationships in the models:</p>
  
  <pre><code>// Post model
      public function postType()
      {
          return $this-&gt;belongsTo(PostType::class);
      }
  
  // PostType model
      public function post()
      {
         return $this-&gt;hasMany(Post::class);
      }
  </code></pre>
  
  <p>Now I want to receive all Posts (of the selected posTypes) from the current user (Auth::user()).</p>
  
  <p>But I don't know how. Does anyone have an idea?</p>