title: How to pass a VueJS variable into a Laravel blade route
body: <p>I'm looping over a JSON array in VueJS and outputting each item to the screen but I need to create a link/route to a resource controller with the ID being returned for each row like so:</p>
  
  <pre><code>&lt;tr v-for="item in searchResults.group"&gt;
      &lt;td&gt;
          &lt;a href="{{ route('admin.edit', @{{ item.id }} ) }}"&gt;&lt;button type="button" class="btn btn-info btn-sm"&gt;Edit&lt;/button&gt;&lt;/a&gt;
  </code></pre>
  
  <p>So I've tried putting the variable into the route like so <code>@{{ item.id }}</code> but get the error:</p>
  
  <p><code>syntax error, unexpected '{' (View: /application/resources/views/admin/edit.blade.php)</code></p>
  
  <p>The way I have done it is not the correct way obviously but I can't find anything in the documentation to achieve this.</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>Further input on this. The route function requires a second parameter, in this case, the ID of the item to edit. In pure PHP/Blade I have this and it works:</p>
  
  <pre><code>&lt;a href="{{ route('admin.edit', $item-&gt;id ) }}"&gt;&lt;button type="button" class="btn btn-info btn-sm"&gt;Reduce&lt;/button&gt;&lt;/a&gt;
  </code></pre>
  
  <p>For the dynamic search page, I need to somehow pass that second parameter into blade/php from a vuejs variable but I just can't work out how to do it.</p>