title: Blade returns undefined offset
body: <p>I've started learning PHP Laravel and I'm struggling a bit with something (probably quite trivial). When I render my page I see the following error:</p>
  
  <blockquote>
    <p>ErrorException in BladeCompiler.php line 584: Undefined offset: 1</p>
  </blockquote>
  
  <p><strong>Controller</strong></p>
  
  <p>Located at \App\Http\Controllers\CompanyController.php</p>
  
  <pre><code>namespace App\Http\Controllers;
  
  use App\Company;
  use Illuminate\Http\Request;
  
  class CompanyController extends Controller
  {
  
      function index()
      {
          $companies = Company::all();
  
          // return $companies;
          return view('public.company.index', compact('companies'));
      }
  
  }
  </code></pre>
  
  <p><strong>View</strong></p>
  
  <p>Located at \App\resources\views\public\company\index.blade.php</p>
  
  <pre><code>@extends('public.layout')
  
  @section('content')
      Companies
      @foreach $companies as $company
          {{ $company-&gt;title }}
      @endforeach
  @stop
  </code></pre>
  
  <p>When I uncomment <code>return $companies</code> in my Controller I do have result, but .. I'm not sure why my - very simple - view isn't rendering. Who can help me out?</p>