2020-04-14 00:20:54 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Mail;
|
|
|
|
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
use Illuminate\Mail\Mailable;
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
2021-12-18 22:43:25 +01:00
|
|
|
use Illuminate\Support\Facades\App;
|
2020-04-14 00:20:54 +02:00
|
|
|
|
|
|
|
class ExistingMigration extends Mailable
|
|
|
|
{
|
2021-02-11 13:35:46 +01:00
|
|
|
// use Queueable, SerializesModels;
|
2020-04-14 00:20:54 +02:00
|
|
|
|
2021-05-04 04:40:28 +02:00
|
|
|
public $company;
|
|
|
|
|
|
|
|
public $settings;
|
|
|
|
|
|
|
|
public $logo;
|
|
|
|
|
|
|
|
public $company_name;
|
|
|
|
|
2020-04-14 00:20:54 +02:00
|
|
|
/**
|
|
|
|
* Create a new message instance.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2021-05-04 04:40:28 +02:00
|
|
|
public function __construct($company)
|
2020-04-14 00:20:54 +02:00
|
|
|
{
|
2021-05-04 04:40:28 +02:00
|
|
|
$this->company = $company;
|
2020-04-14 00:20:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Build the message.
|
|
|
|
*
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function build()
|
|
|
|
{
|
2021-12-18 22:43:25 +01:00
|
|
|
App::setLocale($this->company->getLocale());
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2021-05-04 04:40:28 +02:00
|
|
|
$this->settings = $this->company->settings;
|
|
|
|
$this->logo = $this->company->present()->logo();
|
|
|
|
$this->company_name = $this->company->present()->name();
|
2020-12-03 21:41:36 +01:00
|
|
|
|
2021-06-09 17:16:16 +02:00
|
|
|
return $this
|
|
|
|
->from(config('mail.from.address'), config('mail.from.name'))
|
2022-03-04 03:08:18 +01:00
|
|
|
->text('email.migration.existing_text')
|
2021-06-09 17:16:16 +02:00
|
|
|
->view('email.migration.existing');
|
2020-04-14 00:20:54 +02:00
|
|
|
}
|
|
|
|
}
|