vito/app/Notifications/SourceControlDisconnected.php
Saeed Vaziry 5c72f12490 init
2023-07-02 12:47:50 +02:00

43 lines
1.1 KiB
PHP

<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class SourceControlDisconnected extends Notification implements ShouldQueue
{
use Queueable;
protected string $sourceControl;
public function __construct(string $sourceControl)
{
$this->sourceControl = $sourceControl;
}
public function via(): array
{
return ['mail'];
}
public function toMail(): MailMessage
{
return (new MailMessage)
->subject('Lost connection to your '.$this->sourceControl)
->line("We've lost connection to your $this->sourceControl account.")
->line("We'll not able to do any deployments until you reconnect.")
->line("To reconnect your $this->sourceControl account please click on the bellow button.")
->action('Reconnect', url('/source-controls'));
}
public function toArray(): array
{
return [
//
];
}
}