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
+15 -15
View File
@@ -3,19 +3,16 @@
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 ExpenseApproved extends Mailable
{
use Queueable, SerializesModels;
/**
* Create a new message instance.
*/
public function __construct(
protected string $name,
protected string $expense_number,
@@ -24,9 +21,6 @@ class ExpenseApproved extends Mailable
protected string $url,
) {}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
@@ -34,9 +28,6 @@ class ExpenseApproved extends Mailable
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
@@ -51,13 +42,22 @@ class ExpenseApproved extends Mailable
);
}
/**
* Get the attachments for the message.
*
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
*/
public function attachments(): array
{
return [];
}
/**
* Render the Blade email template as HTML string (for Brevo API).
*/
public function renderHtml(): string
{
return View::make('mail.approved', [
'name' => $this->name,
'expense_number' => $this->expense_number,
'tanggal' => $this->tanggal,
'total' => $this->total,
'url' => $this->url,
])->render();
}
}