%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/forge/api-takeaseat.eco-n-tech.co.uk/app/Notifications/Client/
Upload File :
Create Path :
Current File : //home/forge/api-takeaseat.eco-n-tech.co.uk/app/Notifications/Client/BookingRescheduled.php

<?php

namespace App\Notifications\Client;

use App\Models\Booking;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\NexmoMessage;

class BookingRescheduled extends Notification
{
    use Queueable;

    /**
     * @var Booking
     */
    protected $booking;

    /**
     * Create a new notification instance.
     *
     * @return void
     */
    public function __construct(Booking $booking)
    {
        $this->booking = $booking;
    }

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

    /**
     * Get the mail representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return \Illuminate\Notifications\Messages\MailMessage
     */
    public function toMail($notifiable)
    {
        return (new MailMessage)
                    ->greeting('Hi '.$this->booking->user->first_name)
                    ->line('Your session with '.$this->booking->therapist->user->full_name.' has been successfully rescheduled.')
                    ->line('Your session time is now: '.$this->booking->start_date->format('d/m/Y H:i').' - '.$this->booking->end_date->format('H:i'))
                    ->line('Please check the details below are correct. You can make changes up to 48 hours before the session starts, after this you will not be due a refund. Ensure you have any information required to attend the session such as video links or directions if it is in person.')
                    ->line('Please contact your therapist if you do not receive this before the session is due to start.');
    }

    /**
     * Get the Vonage / SMS representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return \Illuminate\Notifications\Messages\NexmoMessage
     */
    public function toNexmo($notifiable)
    {
        return (new NexmoMessage)
            ->content('Your session with '.$this->booking->therapist->user->full_name.' on '.$this->booking->start_date.' has been rescheduled. Please check your email for the new details. Or log into your account www.takeaseat.co.uk');
    }

    /**
     * Get the array representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function toArray($notifiable)
    {
        return [
            //
        ];
    }
}

Zerion Mini Shell 1.0