subscription->workspacePackage?->package?->name ?? 'Subscription'; $renewalDate = $this->subscription->current_period_end?->format('j F Y'); return (new MailMessage) ->subject('Upcoming renewal - '.$packageName) ->greeting('Your subscription renews soon') ->line('Your '.$packageName.' subscription will automatically renew on '.$renewalDate.'.') ->line('**Renewal amount:** '.$commerce->formatMoney($this->amount, $this->currency)) ->line('No action is required. Your payment method on file will be charged automatically.') ->action('Manage Subscription', route('hub.billing.subscription')) ->line('Want to make changes? You can upgrade, downgrade, or cancel your subscription at any time before the renewal date.') ->salutation('Host UK'); } public function toArray(object $notifiable): array { return [ 'subscription_id' => $this->subscription->id, 'workspace_id' => $this->subscription->workspace_id, 'renewal_date' => $this->subscription->current_period_end?->toISOString(), 'amount' => $this->amount, 'currency' => $this->currency, ]; } }