Laravel models, relationships how to make a innjoin query using Eloquent?
<p>Controller code (which isn`t working)</p>

<pre><code> $employees = Employee::with('department')-&gt;get();
</code></pre>

<p><strong>Model:department</strong></p>

<pre><code>class Department extends Model
{
...
/**
 * Defining Relationships.
 */
   public function employee()
   {
    return $this-&gt;hasMany('GloboDeals\Employee');
   }
}
</code></pre>

<p><strong>Model:employee</strong></p>

<pre><code>class Employee extends Model
{
/**
 * Defining Relationships.
 */
....
 public function department()
{
    return $this-&gt;belongsTo('GloboDeals\Department','departments_id','id');
}
</code></pre>

<p>the external ids have the name of <code>table_id</code>.</p>

<p>I search and search and none of the solutions are working so I guess  my code is just blehhh, if anyone could check it out and give me an idea. </p>