%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/geotechnics/api/app/Notifications/
Upload File :
Create Path :
Current File : /var/www/html/geotechnics/api/app/Notifications/SendResetPasswordToClientNotification.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;

class SendResetPasswordToClientNotification extends Notification implements ShouldQueue
{
    use Queueable;
    /**
     * @var User
     */
    private $user;
    private $token;

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

    /**
     * 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 \Illuminate\Notifications\Messages\MailMessage
     */
    public function toMail($notifiable)
    {
        return (new MailMessage)->from('greengeotechnics2019@gmail.com', 'Green geotechnics')
                                ->subject('Account setup')
                                ->greeting("Hello {$this->user->getFullName()}")
                                ->line('An account was created using your email account. Click the button below to setup your password')
                                ->action('Set password', env('DASHBOARD_URL') . 'reset-password?token=' . $this->token . '&email=' . $this->user->email)
                                ->salutation(' ');
    }

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

Zerion Mini Shell 1.0