Current File : //home/tradevaly/www/app/Notifications/frontend/RfqMessage.php
<?php

namespace App\Notifications;

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

class RfqMessage 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('Welcome to Tradevaly!')
            ->greeting('Hello ' . $this->user->name)
            ->line('Thank you for your precious time and your keen interest on tradevaly.')
            ->line('Name : '.$this->user->name)
            ->line('Email : '.$this->user->email)
            ->line('Phon Number : '.$this->user->phone)
            ->line('Industry Name : '.$this->user->industry_name)
            ->line('Want To Buy : '.$this->user->want_buy)
            ->line('Quantity: '.$this->user->qty)
            ->line('Payment Method: '.$this->user->p_methods)
            ->line('Port: '.$this->user->port)
            ->line('Frequency: '.$this->user->frequency)
            ->line('Validity: '.$this->user->validity)
            ->line('Details: '.$this->user->details);
    }

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