1
私のLaravel 5.4モデルの1つでは、複数のアクセサを持っています。このように:Laravel passアクセッサからvue
<product :prp-product="{{json_encode($product)}}"></product>
product.revenue
存在しません:
public function getRevenueAttribute()
{
return $this->calculate()->revenue($this->price, $this->amount);
}
問題は、私は私のVUEコンポーネントにモデルを渡すときということです。これを達成する方法はありますか?私は再びこれらの事をvueで計算したくありません。
ありがとうございます。