1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-16 08:02:40 +01:00
invoiceninja/app/Mail/MigrationCompleted.php

48 lines
1.1 KiB
PHP
Raw Normal View History

<?php
namespace App\Mail;
2021-01-31 06:07:45 +01:00
use App\Models\Company;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class MigrationCompleted extends Mailable
{
// use Queueable, SerializesModels;
2021-01-31 06:07:45 +01:00
public $company;
public $check_data;
/**
* Create a new message instance.
*
* @return void
*/
2021-02-10 04:18:23 +01:00
public function __construct(Company $company, $check_data = '')
{
2021-01-31 06:07:45 +01:00
$this->company = $company;
$this->check_data = $check_data;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
2021-01-31 06:07:45 +01:00
$data['settings'] = $this->company->settings;
$data['company'] = $this->company->fresh();
2021-02-02 06:11:33 +01:00
$data['whitelabel'] = $this->company->account->isPaid() ? true : false;
2021-06-26 04:38:56 +02:00
$data['check_data'] = $this->check_data ?: '';
2021-06-20 23:09:42 +02:00
$data['logo'] = $this->company->present()->logo();
2021-02-03 13:29:44 +01:00
$result = $this->from(config('mail.from.address'), config('mail.from.name'))
->view('email.import.completed', $data);
return $result;
}
}