dqvj51875 2017-11-24 14:48 采纳率: 0%
浏览 101

如何将js变量传递给laravel中的url标记

I do have a variable in vuejs :

invoice.id 

I want to add this id to a laravel route in blade like so :

<a href="/invoice/{{invoice.id}}/history" />

but it does not work, is there any way how to pass that variable to the route ?

I am getting invoices as an array like so :

<script>
    import {statusColor} from "../util";

    export default {
        props: ['invoice', 'index'],
</script>

invoice its an array.

  • 写回答

1条回答 默认 最新

  • doushang1778 2017-11-24 14:51
    关注

    You can try:

    @{{ invoice.id }}
    

    Hope help your issue.

    评论

报告相同问题?