Current File : //proc/thread-self/root/proc/self/root/home/tradevaly/www/app/Notifications/UserVerification.php
<?php

namespace App\Notifications;

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

class UserVerification extends Notification
{
    use Queueable;
    public $user;

    /**
     * Create a new notification instance.
     *
     * @return void
     */
    public function __construct($user)
    {
        $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)
            ->subject('User Verification Code')
            ->greeting('Hello ' . $this->user->name)
            ->line('Thanks for Registration, your verification code is.'.$this->user->verify_code)
            ->line('Please return to Tradevaly website and enter your code to complete the process.
If you have any issue confirming your email we will be happy to help you. You can contact us on ceo@tradevaly.com.bd.')
            ->action('Verify', route('front.user.verify'))
            ->line('Thank you');
    }

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