Shop, menu, and booking storefronts with OIDC SSO, Pay checkout, and merchant.ladill.com deployment workflow. Co-authored-by: Cursor <cursoragent@cursor.com>
46 lines
1.2 KiB
PHP
46 lines
1.2 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 SslProvisionedNotification extends Notification implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
public function __construct(
|
|
private readonly Domain $domain
|
|
) {
|
|
}
|
|
|
|
public function via($notifiable): array
|
|
{
|
|
return ['mail', 'database'];
|
|
}
|
|
|
|
public function toMail($notifiable): MailMessage
|
|
{
|
|
return (new MailMessage())
|
|
->subject("SSL Certificate Active: {$this->domain->host}")
|
|
->view('mail.notifications.ssl-provisioned', [
|
|
'domain' => $this->domain,
|
|
'expiresAt' => $this->domain->ssl_expires_at,
|
|
'websiteUrl' => "https://{$this->domain->host}",
|
|
]);
|
|
}
|
|
|
|
public function toArray($notifiable): array
|
|
{
|
|
return [
|
|
'title' => 'SSL Certificate Active',
|
|
'message' => "Your SSL certificate for {$this->domain->host} is now active. Your site is secure!",
|
|
'icon' => 'ssl',
|
|
'url' => route('user.domains.show', $this->domain),
|
|
];
|
|
}
|
|
}
|