Current File : /home/tradevaly/public_html/app/Notifications/User/Advertisement/AdvertismentCreateInvoice.php |
<?php
namespace App\Notifications\User\Advertisement;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class AdvertismentCreateInvoice extends Notification
{
use Queueable;
public $data;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($data)
{
$this->data = $data;
}
/**
* 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('Your Advertising Purchase Invoice')
// ->view( 'mail.user.advertisement.purchaseInvoice', ['data' => $this->data]);
->greeting('Hello ' . $this->data->name)
->line('Thank you for your recent advertisement purchase!')
->line('Below are the details of your advertisement purchase invoice:')
->line('Advertising duration: ' . $this->data->duration.' Month')
->line('Invoice Date: ' . now()->toFormattedDateString())
->line('Advertising Place: ' . $this->data->advertisment_place)
->line('Amount: BDT' . $this->data->amount)
->line('Payment Status: ' . $this->data->payment_status)
->line('Please make the payment to finalize your advertisement purchase.')
->line('If you have any questions or need assistance, please feel free to contact our support team.')
->line('Thank you for choosing to advertise with us!');
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}