title: want to fetch database records in foreach loop, which is in laravel blade/view file?
body: <p>Codeigniter View File Code:</p>
  
  <pre><code>&lt;?php
      $i = 1; 
      if($recentOrders) {
          foreach($recentOrders as $row) {
              $shpname = $this-&gt;admin-&gt;getDataFromTableWithWhere('ci_user',array('user_id'=&gt;$row-&gt;user_id));
              $StatusName = $this -&gt; admin -&gt; getDataFromTableWithWhere('ci_order_status',array('status_id'=&gt;$row-&gt;status_id));
  ?&gt;
  
  &lt;tr&gt;
      &lt;td&gt;&lt;?php echo $i?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo ucfirst($shpname[0]-&gt;shop_name); ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row-&gt;order_no; ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo ucfirst($StatusName[0]-&gt;name); ?&gt;&lt;/td&gt;
      &lt;td&gt;
          &lt;a href="#"&gt;
              &lt;i class="fa fa-edit"&gt;&lt;/i&gt;
          &lt;/a&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;?php }
      $i++;
  } ?&gt;
  </code></pre>
  
  <p>Now same i've to use it in laravel view(blade) file</p>
  
  <p>want to fetch database records in foreach loop (which is in laravel view/blade file)</p>
  
  <p>please give me idea??</p>