14-04-2026
This commit is contained in:
parent
f58c709945
commit
0f82fea88a
72 changed files with 7414 additions and 148 deletions
31
app/Mail/PaymentIncidentAlert.php
Normal file
31
app/Mail/PaymentIncidentAlert.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Models\PaymentIncident;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class PaymentIncidentAlert extends Mailable implements ShouldQueue
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public function __construct(public PaymentIncident $incident) {}
|
||||
|
||||
public function build(): self
|
||||
{
|
||||
$severityLabel = strtoupper($this->incident->severity_label);
|
||||
$subject = "[{$severityLabel}] Payment Incident: {$this->incident->title}";
|
||||
|
||||
return $this
|
||||
->subject($subject)
|
||||
->view('emails.payment-incident-alert')
|
||||
->with([
|
||||
'title' => "Payment Incident – {$severityLabel}",
|
||||
'incident' => $this->incident,
|
||||
'dashboardUrl' => route('admin.payment-dashboard.show', $this->incident),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue