%PDF- %PDF-
Mini Shell

Mini Shell

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

<?php

namespace App\Notifications;

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

class PasswordChanged extends Notification implements ShouldQueue
{
    use Queueable;

    /**
     * @var \App\Models\User
     */
    private $user;

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

    /**
     * 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('Hey '.$this->user->first_name)
                    ->line('Your password has been changed, if this was not you please contact us immediately.')
                    ->action('Contact Us', url('/'))
                    ->line('Thank you for using Takeaseat!');
    }

    /**
     * Get the Vonage / SMS representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return \Illuminate\Notifications\Messages\NexmoMessage
     */
    public function toNexmo($notifiable)
    {
        return (new NexmoMessage)
            ->content("Hey ".$this->user->first_name, ", it looks like your password was just changed on your Takeaseat profile, if this wasn't you, please get in touch with as soon as possible, otherwise you can just ignore this message.");
    }
}

Zerion Mini Shell 1.0