title: Laravel Access to several tables
body: <p>I'm having an issue in accessing to data that are related in more than one table, here my code:</p>
  
  <pre><code>&lt;table class="table table-striped"&gt;
      &lt;thead&gt;
          &lt;th&gt;Ejercicio&lt;/th&gt;
          &lt;th&gt;Unidad&lt;/th&gt;
          &lt;th&gt;Descripcion&lt;/th&gt;
          &lt;th&gt;Tipo actividad&lt;/th&gt;
          &lt;th&gt;Operaciones&lt;/th&gt;
      &lt;/thead&gt;
      @foreach($exercises as $exercise)
      &lt;tbody&gt;
          &lt;td&gt;{{$exercise-&gt;name}}&lt;/td&gt;
          &lt;td&gt;{{$exercise-&gt;unit}}&lt;/td&gt;
          &lt;td&gt;{{$exercise-&gt;description}}&lt;/td&gt;
          &lt;td&gt;{{$exercise-&gt;activity_id}}&lt;/td&gt;
          &lt;td&gt;
              &lt;?php echo link_to('exercise/edit/'.$exercise-&gt;id, $title = 'Editar', $attributes = array('class' =&gt; 'btn btn-primary'), $secure = null); ?&gt;                
          &lt;/td&gt;
      &lt;/tbody&gt;
      @endforeach
  &lt;/table
  </code></pre>
  
  <p>on line <code>&lt;td&gt;{{$exercise-&gt;activity_id}}&lt;/td&gt;</code> this is just a foreign key for another table named activity_type which has an id and a name, so what I wanted to be shown is the name with this id.</p>
  
  <p>How can I do that?</p>