Current File : /home/tradevaly/public_html/app/Notifications/frontend/InqueryMessage.php |
<?php
namespace App\Notifications\frontend;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class InqueryMessage 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)
->greeting('Hello ' . $this->user->name)
->line('"We are excited to inform you that someone has shown interest in your product on Tradevaly!')
->line('Here are some details about the interested buyer:')
->line('Offer Title: '.$this->user->title)
->line('Name: '.$this->user->visitor_name)
->line('Product Name:'.$this->user->product_name)
->action('Produt Link', route('product.view', $this->user->slug))
->line('Email: '.$this->user->email)
->line('Phone Number: '.$this->user->phone)
->line('Additional Details: '.$this->user->details)
->line('This could be a potential buyer for your product. Take advantage of this opportunity and engage with them to secure a successful transaction.')
->line('Thank you for choosing Tradevaly! We wish you a prosperous selling experience.');
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}