%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/ResetPasswordNotification.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 ResetPasswordNotification extends Notification implements ShouldQueue
{
    use Queueable;
    private $token;

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

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

    /**
     * Get the mail representation of the notification.
     *
     * @param User $user
     * @return \Illuminate\Notifications\Messages\MailMessage
     */
    public function toMail(User $user)
    {
        return (new MailMessage)->from('greengeotechnics2019@gmail.com', 'Green geotechnics')
                                ->subject('Forgot password')
                                ->greeting(' ')
                                ->line('We received a request for reset password on this account. If this request was not initiated by you please ignore this email.')
                                ->action('Forgot', env('DASHBOARD_URL') . 'reset-password?token=' . $this->token . '&email=' . $user->email)
                                ->salutation(' ');
    }

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

Zerion Mini Shell 1.0