Current File : /home/tradevaly/public_html/app/Notifications/SubscriptionSuccess.php
<?php

namespace App\Notifications;

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

class SubscriptionSuccess 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('Welcome to Premium Membership!!')
            ->greeting('Hello ' . $this->user->name)
            ->line('We are thrilled to welcome you to our Premium Membership program! 🎉')
            ->line('Thank you for choosing to upgrade to our premium package. With Premium Membership, you are about to unlock a world of exclusive benefits and enhanced features that will elevate your experience with')
            ->action('Dashboard', url('https://www.tradevaly.com.bd/user/dashboard'))
            ->line('Thank you for joining Tradvaly');
    }

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