123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
- namespace App\Notifications;
- use App\Models\Payment;
- use Illuminate\Bus\Queueable;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Notifications\Messages\MailMessage;
- use Illuminate\Notifications\Notification;
- class ConfirmPaymentNotification extends Notification implements ShouldQueue
- {
- //THIS IS BASICALLY NOT USED ANYMORE WITH INVOICENOTIFICATION IN PLACE
- use Queueable;
- private Payment $payment;
- /**
- * Create a new notification instance.
- *
- * @return void
- */
- public function __construct(Payment $payment)
- {
- $this->payment = $payment;
- }
- /**
- * Get the notification's delivery channels.
- *
- * @param mixed $notifiable
- * @return array
- */
- public function via($notifiable)
- {
- return ['mail'];
- }
- /**
- * Get the mail representation of the notification.
- *
- * @param mixed $notifiable
- * @return MailMessage
- */
- public function toMail($notifiable)
- {
- return (new MailMessage)
- ->subject(__('Payment Confirmation'))
- ->markdown('mail.payment.confirmed', ['payment' => $this->payment]);
- }
- /**
- * Get the array representation of the notification.
- *
- * @param mixed $notifiable
- * @return array
- */
- public function toArray($notifiable)
- {
- return [
- 'title' => __('Payment Confirmed!'),
- 'content' => __('Payment Confirmed!'),
- ];
- }
- }
|