1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Mail/MigrationFailed.php

51 lines
1.1 KiB
PHP
Raw Normal View History

<?php
namespace App\Mail;
2021-06-09 17:25:59 +02:00
use App\Models\Company;
use Illuminate\Mail\Mailable;
use Illuminate\Support\Facades\App;
class MigrationFailed extends Mailable
{
public $exception;
2021-06-09 17:25:59 +02:00
public $content;
2021-06-09 17:25:59 +02:00
2021-05-26 05:17:22 +02:00
public $company;
2021-06-09 17:25:59 +02:00
2021-08-10 03:40:58 +02:00
public $is_system = false;
/**
* Create a new message instance.
*
* @param $content
* @param $exception
*/
2021-06-09 17:25:59 +02:00
public function __construct($exception, Company $company, $content = null)
{
$this->exception = $exception;
$this->content = $content;
2021-05-26 05:17:22 +02:00
$this->company = $company;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
App::setLocale($this->company->getLocale());
2021-06-09 17:25:59 +02:00
return $this
->from(config('mail.from.address'), config('mail.from.name'))
2022-03-04 01:45:19 +01:00
->text('email.migration.failed_text')
2021-06-09 17:25:59 +02:00
->view('email.migration.failed', [
'logo' => $this->company->present()->logo(),
'settings' => $this->company->settings,
2021-08-10 03:40:58 +02:00
'is_system' => $this->is_system,
2021-06-09 17:25:59 +02:00
]);
}
}