title: How to join three table in laravel eloquent?
body: <p>I have three tables: </p>
  
  <pre><code>consignee (id,name) , jobs(id,consignee_id), expenses(id,job_id)
  </code></pre>
  
  <p>In my <code>ExpensesController</code>  </p>
  
  <pre><code>public function index(){
          $expenses = \App\Expense::all();
          return view('expenses.index', compact('expenses'));}
  </code></pre>
  
  <p>in my index view page i want get all the details in expenses table with consignee name now  in my view page </p>
  
  <pre><code>@foreach($expenses as $expense)
  &lt;tr&gt;
    &lt;td width="5%"&gt;{!! $expense-&gt;id !!}&lt;/td&gt;
  &lt;td width="7%"&gt;{!! $expense-&gt;date !!}&lt;/td&gt;
  &lt;td width="7%"&gt;{!! $expense-&gt;job_id !!}&lt;/td&gt;
  &lt;td width="10%"&gt;{!!$expense-&gt; !!}&lt;/td&gt;&lt;/tr&gt;
                          @endforeach
  </code></pre>
  
  <p>i dont know how to get consignee name in my index view any one suggest me idea </p>