Closed rambo666 closed 4 years ago
invoiceItems
is only for extra line items that were applied to an invoice.
$invoice->subscriptions()
is for the subscriptions themselves. Is that what you need?
https://github.com/laravel/cashier/blob/11.x/resources/views/receipt.blade.php#L154-L181
I think so. Not sure what invoiceItems() really does.
It's when you add extra items to the invoice. Like with the tab
method.
Ahh ok yes I got it. Thanks.
Description:
I tried to produce an invoice pdf using your code as below.
return $user->downloadInvoice($invoice_id, [ 'vendor' => 'Company Name', 'product' => 'Monthly Subscription or Something', ]);
Then I did
dd($invoice->invoiceItems());
on pdf viewIt returns null.
I tried to do a foreach of $invoice->invoiceItems() and there are no data.
I guess it is conflicting with multiplan subscription Really not sure If I am doing it right or this is a bug.