title: How to get all records in laravel Models
body: <p>I'm not using eloquent, my models are like this.</p>
  
  <pre><code>class drivers extends Model
  {
  }
  </code></pre>
  
  <p>I want to display records of all drivers ( one record in each row )</p>
  
  <p>My <strong>driver</strong> table has field (<code>driver_id</code>,<code>name</code>,<code>tyre_id</code>)</p>
  
  <p>My <strong>tyre</strong> table has field (<code>id</code>, <code>title</code>)</p>
  
  <p>My <strong>bank</strong> table has field (<code>id</code>, <code>driver_id</code>, <code>bank</code>)</p>
  
  <p>I want my record to be like this...</p>
  
  <p><code>Driver Id</code>, <code>Name</code>, <code>Bank Details</code>, <code>Tyre Title</code></p>
  
  <p><code>100000111</code>, <code>Ayer</code>,  <code>Available</code>,  <code>GO</code></p>
  
  <p>.. so on</p>
  
  <p>For bank details if driver_id has a record in bank table, it should display available otherwise N/A.</p>
  
  <pre><code>$drivers= Drivers::get();
  $myarray = ();
  foreach ($drivers as $d){
      $bank = Bank::where('driver_id',$d-&gt;driver_id)-&gt;first();
      $tyre = Tyre::where('id',$d-&gt;tyre_id)-&gt;first();
      $myarray[]  = $d-&gt;driver_id;
      $myarray[]  = $d-&gt;name;
      $myarray[]  = isset($bank) ? "available" ; '';
      $myarray[]  = $tyre-&gt;title;
  
  }
  </code></pre>
  
  <p>This is what i have tried, I'm to new to laravel, how can i achieve this in laravel or using query like DB Table?</p>