Here's the deal, I'm using blade and vue.js together on my Laravel app, and I need to build a url for my anchor tag... With blade only, what I would do was:
{{ Route('chef.menus.show', [$shop, $menu]) }}
Since my route is
Route::get('/lojas/{shop}/cardapios/{menu}', 'MenuController@show')
->name('chef.menus.show');
But, since I'm not using blade @foreach to render my links, and I'm using v-for. What is the best way to build a url from a Route name (if it is possible) inside here:
<tr v-for="menu in menus">
<td>@{{ menu.id }}</td>
<td><a href="**URL GOES HERE**">@{{ menu.name }}</a></td>
<td>@{{ menu.items.length }}</td>
<td>
<a href="#"><i class="material-icons md-16">delete</i></a>
<a href="#"><i class="material-icons md-16">edit</i></a>
</td>
</tr>
Keep in mind that I need to pass {{$shop}} (from PHP) and @{{ menu.slug }} from vue.js to correctly build my url :(
I appreciate any help! Thank you very much