Current File : /home/tradevaly/www/app/Notifications/admin/advertisment/ActiveAdvertisment.php
<?php

namespace App\Notifications\admin\advertisment;

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

class ActiveAdvertisment 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('Your Advertisements Are Ready to Shine!')
        ->greeting('Hello ' . $this->user->name)
        ->line('We are thrilled to let you know that your advertisements are now active and ready to reach your target audience.')
        ->line('Your message is about to reach a whole new level of exposure and impact. Get ready to see your campaigns in action and watch your business grow!')
        // ->line('Start time : '.$this->user->start)
        // ->line('End time : '.$this->user->end)
        ->action('View Your Active Advertisements', url('https://www.tradevaly.com.bd/user/advertisment'))
        ->line('Thank you for choosing Tradevaly for your advertising needs. We look forward to helping you succeed.')
        ->line('If you have any questions or need assistance, please feel free to reach out to our support team.');
    }

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