title: Get data from a table associated with a pivot table
body: <p>I have a many many relationship from which comes a middle table</p>
  
  <p>users</p>
  
  <p>quotes</p>
  
  <p>user_quote (this is the intermediate)</p>
  
  <p>From this intermediate table I have another one to many relationship with another table (quotes_time)</p>
  
  <p>Image database schema</p>
  
  <p><a href="https://i.stack.imgur.com/bivCL.png" rel="nofollow noreferrer">ER DIAGRAM</a></p>
  
  <p>User model:</p>
  
  <pre><code>    public function quotes()
   {
      return $this-&gt;belongsToMany(Quote::class, 'quote_user');
   }
  </code></pre>
  
  <p>Quote model:</p>
  
  <pre><code>public function users()
  {
    return $this-&gt;belongsToMany(User::class, 'quote_user');
  }
  </code></pre>
  
  <p>How can I get the data from the quotes_time table?</p>
  
  <p>In the users controller I have this:</p>
  
  <pre><code> $users = User::with('latestQuotes','latestQuotes.vehicle')-&gt;filter($request);
  </code></pre>
  
  <p>What I really need is to get quotes_time data from users</p>
  
  <p>Sorry for my english</p>