feat: Add Discord alert webhook, ContactCategory enum, form request

- Added Discord alert webhook URL to .env.example
- Created ContactCategory enum with humanReadable method
- Implemented ContactSubmissionRequest form request
- Added ContactSubmission model with fillable and casts properties
- Included configurations for Discord alerts and honeypot protection
This commit is contained in:
Rico van Zelst
2024-02-24 19:58:31 +01:00
parent 13ba72c897
commit c490e87c3e
9 changed files with 348 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Enums;
enum ContactCategory: string
{
case Question = 'question';
case Advertising = 'advertising';
case BugReport = 'bug_report';
case Feedback = 'feedback';
case Other = 'other';
public function humanReadable(): string
{
return match ($this) {
ContactCategory::Question => 'Question',
ContactCategory::Advertising => 'Advertising',
ContactCategory::BugReport => 'Bug Report',
ContactCategory::Feedback => 'Feedback',
ContactCategory::Other => 'Other',
};
}
}