add admin noti email feat
PHP Tests / php-tests (push) Failing after 3m20s

This commit is contained in:
Nyan Lin Paing
2026-08-19 21:43:00 +07:00
parent 532f2ddf99
commit 5c215b4647
6 changed files with 140 additions and 0 deletions
@@ -0,0 +1,61 @@
<?php
namespace Modules\Payment\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
use Modules\Booking\Filament\Resources\Bookings\BookingResource;
use Modules\Booking\Models\Booking;
use Modules\Payment\Models\Payment;
class NewBookingAlert extends Mailable
{
use Queueable, SerializesModels;
public Booking $booking;
public string $url;
/**
* Create a new message instance.
*/
public function __construct(public Payment $payment)
{
$this->booking = $payment->booking;
$this->url = BookingResource::getUrl('view', ['record' => $this->booking]);
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'FamousLY4 New Booking Alert',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
markdown: 'payment::mails.new-booking-alert',
);
}
/**
* Get the attachments for the message.
*
* @return array<int, Attachment>
*/
public function attachments(): array
{
return [];
}
}