douchangmian0305 2015-10-06 15:26
浏览 87
已采纳

如何用laravel回显php函数中的vuejs数据?

I want to echo vuejs data inside a php function like so:

{{ auth()->user()->timesAddedBeer(@{{ beer.id }}) }}

But laravel gives me the following error:

syntax error, unexpected '{'

Can anybody tell me the right way to do this?

  • 写回答

1条回答 默认 最新

  • doushifen4060 2015-10-08 19:51
    关注

    It's not possible because the server can't access the JS value at the time executing the php script.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?