mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 01:41:36 +00:00
34 lines
951 B
PHP
34 lines
951 B
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use App\Models\Server;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
|
|
class ServerInstallationFailed extends AbstractNotification
|
|
{
|
|
protected Server $server;
|
|
|
|
public function __construct(Server $server)
|
|
{
|
|
$this->server = $server;
|
|
}
|
|
|
|
public function rawText(): string
|
|
{
|
|
return __("Installation failed for server [:server] \nCheck your server's logs \n:logs", [
|
|
'server' => $this->server->name,
|
|
'logs' => url('/servers/'.$this->server->id.'/logs'),
|
|
]);
|
|
}
|
|
|
|
public function toEmail(object $notifiable): MailMessage
|
|
{
|
|
return (new MailMessage)
|
|
->subject(__('Server installation failed!'))
|
|
->line('Your server ['.$this->server->name.'] installation has been failed.')
|
|
->line('Check your server logs')
|
|
->action('View Logs', url('/servers/'.$this->server->id.'/logs'));
|
|
}
|
|
}
|