Deploy Ladill Hosting / deploy (push) Failing after 17s
Shared web hosting extracted from the platform monolith, with CI deploy to /var/www/ladill-hosting matching Bird/Domains/Email. Co-authored-by: Cursor <cursoragent@cursor.com>
54 lines
1.5 KiB
PHP
54 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Notifications\Notification;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
|
|
class HostingActivatedNotification extends Notification implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
public function __construct(
|
|
private readonly string $planName,
|
|
private readonly string $activationDate,
|
|
private readonly ?string $domainName = null,
|
|
private readonly ?string $manageUrl = null
|
|
) {
|
|
}
|
|
|
|
public function via($notifiable): array
|
|
{
|
|
return ['mail', 'database'];
|
|
}
|
|
|
|
public function toMail($notifiable): MailMessage
|
|
{
|
|
return (new MailMessage())
|
|
->subject('Your hosting is now active!')
|
|
->view('mail.notifications.hosting-activated', [
|
|
'planName' => $this->planName,
|
|
'activationDate' => $this->activationDate,
|
|
'domainName' => $this->domainName,
|
|
'manageUrl' => $this->manageUrl ?? route('hosting.index'),
|
|
]);
|
|
}
|
|
|
|
public function toArray($notifiable): array
|
|
{
|
|
$message = "Your {$this->planName} hosting plan is now active";
|
|
if ($this->domainName) {
|
|
$message .= " for {$this->domainName}";
|
|
}
|
|
|
|
return [
|
|
'title' => 'Hosting Activated',
|
|
'message' => $message . '.',
|
|
'icon' => 'hosting',
|
|
'url' => $this->manageUrl ?? route('hosting.index'),
|
|
];
|
|
}
|
|
}
|