mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
init
This commit is contained in:
42
app/Notifications/SourceControlDisconnected.php
Normal file
42
app/Notifications/SourceControlDisconnected.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?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 [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user