Deploy Ladill Mini / deploy (push) Successful in 23s
Staff-facing counter register at pos.ladill.com with catalog cart, cash and MoMo/card checkout via Ladill Pay, CRM timeline/import, invoice prefill, and Merchant catalog import. Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
1.4 KiB
PHP
48 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use App\Models\Domain;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Notifications\Notification;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
|
|
class SslExpiringNotification extends Notification implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
public function __construct(
|
|
private readonly Domain $domain,
|
|
private readonly int $daysUntilExpiry
|
|
) {
|
|
}
|
|
|
|
public function via($notifiable): array
|
|
{
|
|
return ['mail', 'database'];
|
|
}
|
|
|
|
public function toMail($notifiable): MailMessage
|
|
{
|
|
return (new MailMessage())
|
|
->subject("SSL Certificate Expiring Soon: {$this->domain->host}")
|
|
->view('mail.notifications.ssl-expiring', [
|
|
'domain' => $this->domain,
|
|
'daysUntilExpiry' => $this->daysUntilExpiry,
|
|
'expiresAt' => $this->domain->ssl_expires_at,
|
|
'manageUrl' => route('user.domains.show', $this->domain),
|
|
]);
|
|
}
|
|
|
|
public function toArray($notifiable): array
|
|
{
|
|
return [
|
|
'title' => 'SSL Certificate Expiring',
|
|
'message' => "Your SSL certificate for {$this->domain->host} expires in {$this->daysUntilExpiry} days.",
|
|
'icon' => 'warning',
|
|
'url' => route('user.domains.show', $this->domain),
|
|
];
|
|
}
|
|
}
|