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>
49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use App\Models\HostingAccount;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class HostingSuspendedNotification extends Notification implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
public function __construct(
|
|
private readonly HostingAccount $account,
|
|
private readonly string $reason,
|
|
) {
|
|
}
|
|
|
|
public function via($notifiable): array
|
|
{
|
|
return ['mail', 'database'];
|
|
}
|
|
|
|
public function toMail($notifiable): MailMessage
|
|
{
|
|
return (new MailMessage())
|
|
->subject('Hosting suspended: '.($this->account->primary_domain ?: $this->account->username))
|
|
->view('mail.notifications.hosting-suspended', [
|
|
'account' => $this->account,
|
|
'reason' => $this->reason,
|
|
'dashboardUrl' => route('hosting.accounts.show', $this->account),
|
|
]);
|
|
}
|
|
|
|
public function toArray($notifiable): array
|
|
{
|
|
$label = $this->account->primary_domain ?: $this->account->username;
|
|
|
|
return [
|
|
'title' => 'Hosting suspended',
|
|
'message' => "Hosting for {$label} has been suspended. {$this->reason}",
|
|
'icon' => 'hosting',
|
|
'url' => route('hosting.accounts.show', $this->account),
|
|
];
|
|
}
|
|
}
|