feat(billing): renewals, coupons, VAT numbering, billing cycles and invoice payment tracking
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
ea9a53f742
commit
25f23d541e
@@ -3,8 +3,10 @@
|
||||
namespace App\Mail\Customer;
|
||||
|
||||
use App\Mail\TemplateMailable;
|
||||
use App\Services\InvoicePdfService;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailables\Attachment;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class DomainOrderReceivedNotification extends TemplateMailable implements ShouldQueue
|
||||
@@ -15,6 +17,15 @@ class DomainOrderReceivedNotification extends TemplateMailable implements Should
|
||||
protected array $data,
|
||||
) {}
|
||||
|
||||
public function attachments(): array
|
||||
{
|
||||
$invoice = app(InvoicePdfService::class)->attachment($this->data['invoice_id'] ?? null);
|
||||
|
||||
return $invoice
|
||||
? [Attachment::fromData(fn () => $invoice['pdf'], $invoice['file_name'])->withMime('application/pdf')]
|
||||
: [];
|
||||
}
|
||||
|
||||
protected function scenario(): string
|
||||
{
|
||||
return 'domain_order_received';
|
||||
|
||||
Reference in New Issue
Block a user