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

41 lines
869 B
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;
/**
* Create a new message instance.
*
* @return void
*/
2021-01-31 06:07:45 +01:00
public function __construct(Company $company)
{
2021-01-31 06:07:45 +01:00
$this->company = $company;
}
/**
* 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;
2020-12-03 12:00:34 +01:00
return $this->from(config('mail.from.address'), config('mail.from.name'))
2021-01-31 06:07:45 +01:00
->view('email.import.completed', $data)
->attach($this->company->invoices->first()->pdf_file_path());
}
}