title: Laravel 5 - Return array to view
body: <p>I'm doing a simple search in my view for some registered videos, this search returns the videos searchable through the post on the form.</p>
  
  <p>The problem happens in the return of data, it does not update the page with the array passed to the view.</p>
  
  <p>This is my form:</p>
  
  <pre><code>&lt;form action="{{ URL::to("/search-video") }}" method="POST" accept-charset="utf-8" class="formSend BuscarVideoSend" id="form-busca-video"&gt;
  
      &lt;div class="col l10"&gt;
  
          &lt;input placeholder="Searchvídeo" name="Name" type="text" class="validate input-white Name valid"&gt;    
      &lt;/div&gt;
      &lt;div class="col l2"&gt;
          &lt;button type="submit" class="btnSend" &gt; Search&lt;/button&gt; 
      &lt;/div&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>public function searchVideo(Request $request){
      $data = $request-&gt;all();
  
      $videos = TbVideoModel::where(
          'nm_video', 
          'LIKE', 
          '%'.$data['Name'].'%'
      )-&gt;get();
  
  
      return view('layouts.videos', compact('videos', $videos));
  }
  </code></pre>
  
  <p>Html to return:</p>
  
  <pre><code>&lt;section id="videoMosaic"&gt;
      &lt;div class="row "&gt; 
          &lt;ul&gt;
  
              @if(isset($videos))
                  @foreach($videos as $video)
                  &lt;li&gt;
                      &lt;a class="bla-1" href="{{$video-&gt;ds_link}}"&gt;
                          &lt;div class="div-imagem-texto"&gt;
                              &lt;img src="http://img.youtube.com/vi/{{$video['ds_imagem_video']}}/0.jpg" alt=""&gt;
                              &lt;div class="texto-sobre-imagem"&gt;
                                  &lt;img src="/images/play.png" alt="" class="play"&gt;
                                  {{$video-&gt;nm_video}}
                                  &lt;p&gt;{{$video-&gt;tx_video}}&lt;/p&gt;
  
                              &lt;/div&gt;                        
                          &lt;/div&gt;
                      &lt;/a&gt; 
                  &lt;/li&gt;
                  @endforeach
              @endif
          &lt;/ul&gt;
  
      &lt;/div&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>It returns the data correctly on console xhr, but it has this error:</p>
  
  <pre><code>Uncaught SyntaxError: Unexpected token &lt;
  </code></pre>
  
  <p>What do I need for the page to be updated with search data? Tks</p>