title: Not able to fetch array in view. Laravel
body: <p>I'm trying to fetch arrays passed from controller. 
  In controller i have used following code:</p>
  
  <pre><code> foreach ($sfees as $sfee) {
      $M_fees[]=M_fees::all()-&gt;whereLoose('id',$sfee-&gt;mfee_id);
  
  
   };
  
  
  return view('bill.verify',compact('bfs','grade','student'))-&gt;with('M_fees',$M_fees);
  </code></pre>
  
  <p>In view:
  I have used following:</p>
  
  <pre><code>@foreach($M_fees as $M_Fees)
                  &lt;tr class="info"&gt;
                      &lt;td&gt;{!!$M_Fees['fee_type']!!}&lt;/td&gt;
                      &lt;td&gt;{!!$M_Fees['amount']!!}&lt;/td&gt;
  
  @endforeach
  </code></pre>
  
  <p>But it shows error of "Undefined index:fee_type".
  But if i just echo </p>
  
  <pre><code>@foreach($M_fees as $M_Fees)
      {!!$M_Fees!!} 
   @endforeach
  </code></pre>
  
  <p>it is showing whole bunch of arrays like:</p>
  
  <p>[{"id":1,"fee_type":"Sports","amount":5000,"created_at":"2016-06-07 08:33:40","updated_at":"2016-06-07 08:33:40"}]</p>
  
  <p>{"1":{"id":2,"fee_type":"Fine","amount":20,"created_at":"2016-06-08 05:16:59","updated_at":"2016-06-08 05:16:59"}}</p>
  
  <p>{"2":{"id":3,"fee_type":"Transportation","amount":500,"created_at":"2016-06-08 05:17:17","updated_at":"2016-06-08 05:17:17"}}</p>
  
  <p>Which includes fee_type and both amount. What is the problem? Can anyone help me?</p>