1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00
invoiceninja/app/Mail/ExistingMigration.php

51 lines
1.0 KiB
PHP
Raw Normal View History

<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\App;
class ExistingMigration extends Mailable
{
// use Queueable, SerializesModels;
2021-05-04 04:40:28 +02:00
public $company;
public $settings;
public $logo;
public $company_name;
/**
* Create a new message instance.
*
* @return void
*/
2021-05-04 04:40:28 +02:00
public function __construct($company)
{
2021-05-04 04:40:28 +02:00
$this->company = $company;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
App::setLocale($this->company->getLocale());
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();
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');
}
}