Laravel 5.2 を使用して、次のコードで正常に動作する請求書のリストを生成しています。
$owner = User::where("accountId",Auth::user()
->accountId)
->where("owner",1)
->first();
$invoices = $owner->invoices();
ただし、請求書をダウンロードしようとすると
return $this->owner->downloadInvoice($id, [
'vendor' => 'XXXXXXX',
'product' => 'XXXXXXX',
]);
次のエラーが表示されます
0aba430056a58a8038d61445deab8578 行 133 の FatalErrorException: 未定義のメソッド Laravel\Cashier\InvoiceItem::startDateString() の呼び出し
エラーは領収書テンプレートのこのブロックから発生しているようですが、大規模なグーグルセッションの後、答えが見つからないようです.
<!-- Display The Subscriptions -->
@foreach ($invoice->subscriptions() as $subscription)
<tr>
<td>Subscription ({{ $subscription->quantity }})</td>
<td>{{ $subscription->startDateString() }} - {{ $subscription->endDateString() }}</td>
<td>{{ $subscription->dollars() }}</td>
</tr>
@endforeach
何か案は?