mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-22 11:12:20 +00:00
31 lines
1.3 KiB
PHP
31 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use App\Models\Server;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
|
|
class ServerInstallationStarted extends AbstractNotification
|
|
{
|
|
public function __construct(protected Server $server) {}
|
|
|
|
public function rawText(): string
|
|
{
|
|
return __("Installation started for server [:server]\nThis may take several minutes depending on many things like your server's internet speed.\nAs soon as it finishes, We will notify you through this channel.\nYou can check the progress live on your dashboard.\n:progress", [
|
|
'server' => $this->server->name,
|
|
'progress' => url('/servers/'.$this->server->id),
|
|
]);
|
|
}
|
|
|
|
public function toEmail(object $notifiable): MailMessage
|
|
{
|
|
return (new MailMessage)
|
|
->subject(__('Server installation started!'))
|
|
->line('Your server\'s ['.$this->server->name.'] installation has been started.')
|
|
->line("This may take several minutes depending on many things like your server's internet speed.")
|
|
->line('As soon as it finishes, We will notify you through this channel.')
|
|
->line('You can check the progress live on your dashboard.')
|
|
->action('Installation Progress', url('/servers/'.$this->server->id));
|
|
}
|
|
}
|