web-mooc/app/Notifications/CoursePurchaseCreated.php
Baghiz Zuhdi Adzin 1f8efdccc4 pembayaran
2026-01-21 15:34:54 +07:00

38 lines
921 B
PHP

<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class CoursePurchaseCreated extends Notification
{
use Queueable;
protected $payment;
protected $courses;
public function __construct($payment, $courses)
{
$this->payment = $payment;
$this->courses = $courses;
}
public function via(object $notifiable): array
{
return ['mail'];
}
public function toMail(object $notifiable): MailMessage
{
return (new MailMessage)
->subject(get_phrase('Course Purchase Created') . ' - ' . config('app.name'))
->view('vendor.notifications.course_purchased_created', [
'user' => $notifiable,
'payment' => $this->payment,
'courses' => $this->courses,
]);
}
}