GOOD SHELL MAS BOY
Server: Apache/2.4.52 (Ubuntu)
System: Linux vmi1836763.contaboserver.net 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64
User: www-data (33)
PHP: 8.4.10
Disabled: NONE
Upload Files
File: /var/www/console.fixgini.com/app/Notifications/NewBookingNotification.php
<?php

namespace App\Notifications;

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

class NewBookingNotification extends Notification
{
    use Queueable;

    protected $providerEmail;
    protected $providerName;
    protected $gigName;
    protected $gigSlug;

    protected $message;
     public function __construct($providerEmail, $providerName, $gigName, $gigSlug, $message)
    {
        $this->providerEmail = $providerEmail;
        $this->providerName = $providerName;
        $this->gigName = $gigName;
        $this->gigSlug = $gigSlug;
        $this->message = $message;
    }

    public function via(object $notifiable): array
    {
        return ['mail'];
    }

    /**
     * Get the mail representation of the notification.
     */
    public function toMail(object $notifiable): MailMessage
    {
        return (new MailMessage)
            ->subject("New Booking update for Your Service: {$this->gigName}") // Subject of the email
            ->line("Hello {$this->providerName},") // Personal greeting
            ->line("You have received a new booking for your service:")
            ->line("{$this->gigName}") // Gig name
            ->line("Message from the customer: {$this->message}") // Customer message
            ->line('Thank you for using our platform! We look forward to your next successful booking.')
            ->action('View Booking Details', "https://fixgini.com/account/task") // Button link
            ->line('If you have any questions, feel free to reach out to us.'); 
    }

 
    public function toArray(object $notifiable): array
    {
        return [
            'provider_email' => $this->providerEmail,
            'provider_name' => $this->providerName,
            'gig_name' => $this->gigName,
            'gig_slug' => $this->gigSlug,
            'message' => $this->message,
        ];
    }
}