2020-01-27 21:56:48 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Mail;
|
|
|
|
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
use Illuminate\Mail\Mailable;
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
|
|
|
class MigrationFailed extends Mailable
|
|
|
|
{
|
|
|
|
|
|
|
|
public $exception;
|
2020-03-05 21:30:32 +01:00
|
|
|
public $content;
|
2021-05-22 05:20:40 +02:00
|
|
|
public $settings;
|
2021-05-26 05:17:22 +02:00
|
|
|
public $company;
|
2020-01-27 21:56:48 +01:00
|
|
|
/**
|
|
|
|
* Create a new message instance.
|
|
|
|
*
|
2020-03-05 21:30:32 +01:00
|
|
|
* @param $content
|
2020-01-27 21:56:48 +01:00
|
|
|
* @param $exception
|
|
|
|
*/
|
2021-05-26 05:17:22 +02:00
|
|
|
public function __construct($exception, $company, $content = null)
|
2020-01-27 21:56:48 +01:00
|
|
|
{
|
|
|
|
$this->exception = $exception;
|
2021-02-10 02:59:30 +01:00
|
|
|
$this->content = $content;
|
2021-05-26 05:17:22 +02:00
|
|
|
$this->settings = $company->settings;
|
|
|
|
$this->company = $company;
|
2020-01-27 21:56:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Build the message.
|
|
|
|
*
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function build()
|
|
|
|
{
|
2020-12-03 12:00:34 +01:00
|
|
|
return $this->from(config('mail.from.address'), config('mail.from.name'))
|
2021-05-26 05:17:22 +02:00
|
|
|
->view('email.migration.failed', ['settings' => $this->settings, 'company' => $this->company]);
|
2020-01-27 21:56:48 +01:00
|
|
|
}
|
|
|
|
}
|