update revisi

This commit is contained in:
Jagad R R
2025-03-05 13:44:58 +07:00
parent 278fc3741d
commit ee3de88659
18 changed files with 673 additions and 121 deletions
+29 -8
View File
@@ -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 ExpenseCreated 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 ExpenseCreated extends Mailable
{
return [];
}
/**
* Render the Blade email template as an HTML string (for Brevo API).
*/
public function renderHtml(): string
{
return View::make('mail.created', [
'name' => $this->name,
'expense_number' => $this->expense_number,
'tanggal' => $this->tanggal,
'total' => $this->total,
'url' => $this->url,
])->render();
}
}