dealhub/app/Notifications/NewContactNotification.php
kusowl aa7e2f245f misx bugfixes:
- fix users cannot reset password due session expiration
- add a new mail when users contacts via Contact form
- add list page for all deals in broker dashboard
- fixed links in home page
2026-02-03 16:06:26 +05:30

40 lines
1.1 KiB
PHP

<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class NewContactNotification extends Notification implements ShouldQueue
{
use Queueable;
public function __construct(
private readonly string $customerName,
private readonly string $customerEmail,
private readonly string $customerMessage
) {
}
public function via($notifiable): array
{
return ['mail'];
}
public function toMail($notifiable): MailMessage
{
return (new MailMessage)
->subject('New Contact Submission: '.$this->customerName)
->greeting('Hello Admin,') // Or keep it empty if you prefer
->line('You have received a new message from your contact form:')
->line("**Name:** {$this->customerName}")
->line("**Email:** {$this->customerEmail}")
->line("**Message:**")
->line($this->customerMessage)
->action('Reply via Email', 'mailto:'.$this->customerEmail);;
}
}