【发布时间】:2019-08-02 08:40:20
【问题描述】:
我有一个现有的 laravel 刀片模板,我正在使用刀片模板中的 Vue 组件重写它。
例如,刀片模板中现有的一行是:
<button class="btn-remove" onclick="removeItem('{{ $item->id }}', this);"></button>
这引用了一个名为removeItem的php函数。
有没有办法在新的Vue组件中调用php函数或者我必须将php函数重做到javascript中?
【问题讨论】:
-
什么是removeItem?根据您的代码,我认为这不是“php函数”。
标签: php laravel vue.js laravel-blade