Current File : /home/tradevaly/public_html/app/Notifications/admin/query/InqueryMassege.php
<?php

namespace App\Notifications\admin\query;

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

class InqueryMassege extends Notification
{
    use Queueable;
    public $data;

    /**
     * Create a new notification instance.
     */
    public function __construct($data)
    {
        $this->data =$data;
    }

    /**
     * Get the notification's delivery channels.
     *
     * @return array<int, string>
     */
    public function via(object $notifiable): array
    {
        return ['mail'];
    }

    /**
     * Get the mail representation of the notification.
     */
    public function toMail($notifiable)
    {
        return (new MailMessage)
                    ->subject('Product History remainder')
                    ->greeting('Hello!'. $this->data['user_name'])
                    ->line('Thanks For Your Visiting Product.')
                    ->line('For discuss just sent an inquery.')
                    ->line('For More Product, Visit Website')
                    ->action('View Product', url($this->data['product_url']))
                    ->line('Thanks you for using our application!');
    }

    /**
     * Get the array representation of the notification.
     *
     * @return array<string, mixed>
     */
    public function toArray(object $notifiable): array
    {
        return [
            //
        ];
    }
}