update revisi
This commit is contained in:
@@ -3,26 +3,33 @@
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Mail\Mailables\Content;
|
||||
use Illuminate\Mail\Mailables\Envelope;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\View;
|
||||
|
||||
class ExpenseApproved2 extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
protected string $name;
|
||||
protected string $expense_number;
|
||||
protected string $tanggal;
|
||||
protected int $total;
|
||||
protected string $url;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*/
|
||||
public function __construct(
|
||||
protected string $name,
|
||||
protected string $expense_number,
|
||||
protected string $tanggal,
|
||||
protected int $total,
|
||||
protected string $url,
|
||||
) {}
|
||||
public function __construct(string $name, string $expense_number, string $tanggal, int $total, string $url)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->expense_number = $expense_number;
|
||||
$this->tanggal = $tanggal;
|
||||
$this->total = $total;
|
||||
$this->url = $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message envelope.
|
||||
@@ -60,4 +67,18 @@ class ExpenseApproved2 extends Mailable
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the Blade email template as an HTML string (for Brevo API).
|
||||
*/
|
||||
public function renderHtml(): string
|
||||
{
|
||||
return View::make('mail.approved2', [
|
||||
'name' => $this->name,
|
||||
'expense_number' => $this->expense_number,
|
||||
'tanggal' => $this->tanggal,
|
||||
'total' => $this->total,
|
||||
'url' => $this->url,
|
||||
])->render();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user