<?php

namespace App\Notifications;

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

class WelcomeSubscriber extends Notification implements ShouldQueue
{
    use Queueable;

    public function via($notifiable)
    {
        return ['mail']; // Sends via email
    }

    public function toMail($notifiable)
    {
        return (new MailMessage)
            ->subject('Welcome to Our Newsletter!')
            ->greeting('Hello!')
            ->line('Thank you for subscribing to our newsletter.')
            ->action('Visit Website', url('/'))
            ->line('We appreciate your support!');
    }
}