%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/silvzytp/ccd-ind-code/app/Notifications/
Upload File :
Create Path :
Current File : /home/silvzytp/ccd-ind-code/app/Notifications/ReminderNotification.php

<?php

namespace App\Notifications;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;

class ReminderNotification extends Notification
{
    use Queueable;
    protected $notification;
    /**
     * Create a new notification instance.
     *
     * @return void
     */
    public function __construct($notification)
    {
        $this->notification = $notification;
    }

    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return ['mail','database'];
    }

    /**
     * Get the mail representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return \Illuminate\Notifications\Messages\MailMessage
     */
    public function toMail($notifiable)
    {
        return (new MailMessage)
            ->line('
                Dear '.$this->notification['agent_name'].',
                This e-mail today is to remind you of your selected calling data number #'.$this->notification['serial'].' for which you set up a REMINDER option earlier!
                Please click on the TAKE ME TO THE REMINDER NUMBER button below to view the calling number.
                Please Note that, you need to login first to view the number.
            ')
            ->action('TAKE ME TO THE REMINDER NUMBER', url('/'))
            ->line('Thank you for using our application!');
    }

    /**
     * Get the array representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function toArray($notifiable)
    {
        return [
            'type'      => 'reminder',
            'call_id'   => $this->notification['id'],
            'serial_no' => $this->notification['serial'],
            'send_date' => $this->notification['updated_at'],
            'name'      => $this->notification['name']
        ];
    }
}

Zerion Mini Shell 1.0