title: insert data into laravel 5 blade from array
body: <p>I'm puzzled over this one..</p>
  
  <p>I have an array of arrays that I'm passing into a blade from a controller
  data looks like this</p>
  
  <pre><code>(
      [0] =&gt; Array
          (
              [id] =&gt; 1
              [name] =&gt; AAAA
          )
  
      [1] =&gt; Array
          (
              [id] =&gt; 2
              [name] =&gt; BBBB
          )
  
      [2] =&gt; Array
          (
              [id] =&gt; 3
              [name] =&gt; CCCC
          )
  
      [3] =&gt; Array
          (
              [id] =&gt; 4
              [name] =&gt; DDDD
          )
  
  )
  </code></pre>
  
  <p>The controller passes it by calling the view as such</p>
  
  <pre><code>return view('items.pivot', compact('sites'));
  </code></pre>
  
  <p>and I attempt to display it in the blade like</p>
  
  <pre><code>@foreach($sites as $site)
      @if($site != '' || $site != null)
          &lt;th class="col1" &gt;{{$site-&gt;name}}&lt;/th&gt;
      @endif
  @endforeach
  </code></pre>
  
  <p>However what I get is the correct number of columns, but with each looking like</p>
  
  <pre><code>&lt;th class="col1" &gt;&lt;/th&gt;
  </code></pre>
  
  <p>What am I doing wrong? I know it must be obvious.. but I can't see it..</p>