title: How to do string concatenation with Javascript in Laravel view?
body: <p>I have <strong><code>data.data[key].thumb</code></strong> and <strong><code>data.data[key].image</code></strong> as variables and this is inside <code>&lt;script&gt;</code> tag in a Laravel Blade template.</p>
  
  <p>There is an error in this line, causing this:</p>
  
  <blockquote>
    <p>Use of undefined constant uploads - assumed 'uploads'</p>
  </blockquote>
  
  <p>The code is:</p>
  
  <pre><code>user_status += '&lt;img src="{{asset(uploads/' + data[key].image + '.' + 
                  data[key].thumb + ')}}" class="img-responsive" 
                  style="height:290px;" alt="360-video-feature" /&gt;&lt;/div&gt;';
  
  user_status += '&lt;img class="OverlayIcon" src=" 
                  {{asset('uploads/video_icon_overlay.png')}}" alt="" /&gt;';
  </code></pre>