Current File : /home/tradevaly/public_html/app/Notifications/User/Advertisement/AdvertismentPaidInvoice.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 AdvertismentPaidInvoice 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)
        ->markdown('mail.user.advertisement.createInvoice', ['data' => $this->data]);
        // return (new MailMessage)
        //     ->subject('Payment Confirmation')
        //     ->greeting('Hello ' . $this->data->name)
        //     ->line('We are pleased to confirm the payment for your recent advertisement purchase!')
        //     ->line('Below are the details of your payment confirmation:')
        //     ->line('Advertising duration: ' . $this->data->duration.' Month')
        //     ->line('Invoice Date: ' . now()->toFormattedDateString())
        //     ->line('Advertising Place: ' . $this->data->advertisment_place)
        //     ->line('Amount: BTD' . $this->data->amount)
        //     ->line('Payment Status: Success')
        //     ->line('Advertisement ID: ' . $this->data->advertisement_id)
        //     ->line('Invoice :')
        //      ->action('Invoice', route('user.my.buy.advertiser.invoice_details',$this->data->id))
        //     ->line('Money Receipt :')
        //      ->action('Money-Receipt', route('user.my.buy.advertiser.money_receipt',$this->data->id))
        //     ->line('Upload Your Banner')
        //      ->action('Upload', route('user.advertisment.edit',$this->data->banner_id))
        //     ->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 [
            //
        ];
    }
}