38 lines
933 B
PHP
38 lines
933 B
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use App\Models\VAPayment;
|
|
use App\Models\Course;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class CoursePaid extends Notification implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
public function __construct(
|
|
public $payment,
|
|
public $courses
|
|
) {}
|
|
|
|
|
|
public function via(object $notifiable): array
|
|
{
|
|
return ['mail'];
|
|
}
|
|
|
|
public function toMail(object $notifiable): MailMessage
|
|
{
|
|
return (new MailMessage)
|
|
->subject(get_phrase('Virtual Account Payment Successful') . ' - ' . config('app.name'))
|
|
->view('vendor.notifications.course_paid', [
|
|
'user' => $notifiable,
|
|
'payment' => $this->payment,
|
|
'courses' => $this->courses,
|
|
]);
|
|
}
|
|
}
|