douchangmian0305
2015-10-06 15:26 阅读 83
已采纳

如何用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 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.

    点赞 评论 复制链接分享

相关推荐