%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/hr/api/app/Notifications/
Upload File :
Create Path :
Current File : /var/www/html/hr/api/app/Notifications/AccountCreatedNotification.php

<?php

namespace App\Notifications;

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

class AccountCreatedNotification 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 mixed $notifiable
     * @return MailMessage
     */
    public function toMail($notifiable)
    {
        $appName = env('APP_NAME', 'HrSys');
        return (new MailMessage)->subject(trans('accountCreatedNotification.subject', [
            'app_name' => $appName,
        ]))
                                ->line(trans('accountCreatedNotification.line1', [
                                    'app_name' => $appName,
                                ]))
                                ->action(trans('accountCreatedNotification.setPassword'), env('FRONTEND_URL') . 'reset-password?token=' . $this->token . '&email=' . $notifiable->email)
                                ->line(trans('notifications.thank_you'));
    }

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

Zerion Mini Shell 1.0