带有DIV ID的路线
单击并将ID传递时,如何正确路由Laravel? 我有一个使用vue,可以打印出数组的每个元素。 像这样:
<div v-for="album in albums" :key="album.id" class="border-2 w-3/4 h-48 bg-sky-500 ">
<a href="/album/">{{ album.title }}</a>
</div>
您可以看到我尝试使用href
来路由。我该如何通过专辑。因此,该路线将是示例localhost:8000/permul/5
感谢您的任何帮助,我也感谢。
How do you correctly route in Laravel when on click and pass the ID along?
I have a using vue that prints out every element of an array.
Like this:
<div v-for="album in albums" :key="album.id" class="border-2 w-3/4 h-48 bg-sky-500 ">
<a href="/album/">{{ album.title }}</a>
</div>
As you can see im trying to route using href
. How can i pass the album.id alongside that? So the route would be for an example localhost:8000/album/5
Thanks for any help, i do appreciate it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
@gev99
感谢您的回复伴侣。
我通过这样做修复了它:
我会尝试一下您的!谢谢你!
@Gev99
Thanks for the reply mate.
I fixed it by doing this:
I will try out yours aswell! Thank you!
//在vue文件中
这是最好的方法
//in vue file
This is the best way