Current File : /home/tradevaly/public_html/app/Notifications/User/Advertisement/ExpiredAdveritisement.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 ExpiredAdveritisement 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)
return (new MailMessage)
->subject('Advertisement Expiration Notification')
->greeting('Hello ' . $this->data->name)
->line("We hope this message finds you well.")
->line("We regret to inform you that your advertisement, '$adTitle,' has expired.")
->line("Below are the details of your expired advertisement:")
->line('Advertising duration: ' . $this->data->duration.' Month')
->line('Advertisement Place: ' . $this->data->advertisment_place)
->line('Advertisement ID: ' . $this->data->advertisement_id)
->line('Invoice Date: ' . now()->toFormattedDateString())
->line('Amount: BTD' . $this->data->amount)
->line('If you wish to renew your advertisement, please visit the following link:')
->action('Renew Advertisement', route('your.renew.route'))
->line('If you have any questions or need further 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 [
//
];
}
}