Skip to content

Commit

Permalink
Added expand option to Subscription latestInvoice()
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumwebco committed Jul 4, 2023
1 parent 02c4656 commit ac34969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -1139,9 +1139,9 @@ public function invoice(array $options = [])
*
* @return \Laravel\Cashier\Invoice|null
*/
public function latestInvoice()
public function latestInvoice(array $expand = [])
{
$stripeSubscription = $this->asStripeSubscription(['latest_invoice']);
$stripeSubscription = $this->asStripeSubscription(['latest_invoice', ...$expand]);

if ($stripeSubscription->latest_invoice) {
return new Invoice($this->owner, $stripeSubscription->latest_invoice);
Expand Down

0 comments on commit ac34969

Please sign in to comment.