Added Support and Analytics for Release

This commit is contained in:
2026-07-10 21:59:35 +10:00
parent d765161b9a
commit 85eeba982f
24 changed files with 673 additions and 320 deletions
@@ -0,0 +1,47 @@
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class SupportRequestSubmitted extends Notification implements ShouldQueue
{
use Queueable;
public function __construct(
public string $name,
public string $email,
public string $reason,
public string $message,
) {}
public function via($notifiable): array
{
return ['mail'];
}
public function toMail($notifiable): MailMessage
{
return (new MailMessage)
->theme('flightsgoneby')
->subject('New Support Request: ' . $this->reasonLabel())
->replyTo($this->email, $this->name)
->greeting('New Support Request')
->line('Reason: ' . $this->reasonLabel())
->line('From: ' . $this->name . ' (' . $this->email . ')')
->line($this->message);
}
protected function reasonLabel(): string
{
return match ($this->reason) {
'bug_report' => 'Bug Report',
'general_feedback' => 'General Feedback',
'missing_data' => 'Missing Data',
default => $this->reason,
};
}
}