title: How to get data from intermediate table Laravel?
body: <p>How to get data from third table through model?</p>
  
  <p>I have model <code>Prototype</code>  and  <code>PrototypeField</code> model.</p>
  
  <p>Where <code>Prototype</code> is:</p>
  
  <pre><code>id | name
  </code></pre>
  
  <p>Where <code>PrototypeField</code> is:</p>
  
  <pre><code>prototype_id | field_id
  </code></pre>
  
  <p>Also there is table <code>Field</code> that contains name of fields:</p>
  
  <pre><code>id | name 
  </code></pre>
  
  <p>How to get names from table <code>Field</code> throught model 'Prototype' where <code>Prototype</code> relative with <code>PrototypeField</code> by:</p>
  
  <pre><code>Prototype.id = PrototypeField.prototype_id
  </code></pre>
  
  <p>So, <code>Prototype</code> can has one or many <code>PrototypeField</code>.</p>