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

166
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "086abffea6e85ef81611cdc1d9cfdc5d",
"content-hash": "2af8ed1dad29aeeb6bd0674017bde595",
"packages": [
{
"name": "andcarpi/laravel-popper",
@@ -4975,6 +4975,170 @@
],
"time": "2024-02-06T20:39:11+00:00"
},
{
"name": "spatie/laravel-discord-alerts",
"version": "1.3.1",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-discord-alerts.git",
"reference": "68bcafdd8774ad3e62185566a1c37eff3c0e1047"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-discord-alerts/zipball/68bcafdd8774ad3e62185566a1c37eff3c0e1047",
"reference": "68bcafdd8774ad3e62185566a1c37eff3c0e1047",
"shasum": ""
},
"require": {
"illuminate/contracts": "^8.73|^9.0|^10.0",
"php": "^8.0",
"spatie/laravel-package-tools": "^1.9.2"
},
"require-dev": {
"nunomaduro/collision": "^5.10|^6.0|^7.0",
"nunomaduro/larastan": "^1.0|^2.0",
"orchestra/testbench": "^6.22|^7.0|^8.0",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.1|^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5",
"spatie/laravel-ray": "^1.26"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Spatie\\DiscordAlerts\\DiscordAlertsServiceProvider"
],
"aliases": {
"Discord": "DiscordAlert"
}
}
},
"autoload": {
"psr-4": {
"Spatie\\DiscordAlerts\\": "src",
"Spatie\\DiscordAlerts\\Database\\Factories\\": "database/factories"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Rias Van der Veken",
"email": "rias@spatie.be",
"role": "Developer"
},
{
"name": "Niels Vanpachtenbeke",
"email": "niels@spatie.be",
"role": "Developer"
},
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"role": "Developer"
}
],
"description": "Send a message to Discord",
"homepage": "https://github.com/spatie/laravel-discord-alerts",
"keywords": [
"laravel",
"laravel-discord-alerts",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/laravel-discord-alerts/issues",
"source": "https://github.com/spatie/laravel-discord-alerts/tree/1.3.1"
},
"funding": [
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2023-07-28T06:55:26+00:00"
},
{
"name": "spatie/laravel-honeypot",
"version": "4.4.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-honeypot.git",
"reference": "85728128acb3ff53ffb23c86b9cc2c3d58355050"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-honeypot/zipball/85728128acb3ff53ffb23c86b9cc2c3d58355050",
"reference": "85728128acb3ff53ffb23c86b9cc2c3d58355050",
"shasum": ""
},
"require": {
"illuminate/contracts": "^8.0|^9.0|^10.0",
"illuminate/encryption": "^8.0|^9.0|^10.0",
"illuminate/http": "^8.0|^9.0|^10.0",
"illuminate/support": "^8.0|^9.0|^10.0",
"illuminate/validation": "^8.0|^9.0|^10.0",
"nesbot/carbon": "^2.0",
"php": "^8.0",
"spatie/laravel-package-tools": "^1.9",
"symfony/http-foundation": "^5.1.2|^6.0"
},
"require-dev": {
"livewire/livewire": "^2.10",
"orchestra/testbench": "^6.23|^7.0|^8.0",
"pestphp/pest-plugin-livewire": "^1.0",
"phpunit/phpunit": "^9.4",
"spatie/pest-plugin-snapshots": "^1.1",
"spatie/phpunit-snapshot-assertions": "^4.2",
"spatie/test-time": "^1.2.1"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Spatie\\Honeypot\\HoneypotServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Spatie\\Honeypot\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Preventing spam submitted through forms",
"homepage": "https://github.com/spatie/laravel-honeypot",
"keywords": [
"laravel-honeypot",
"spatie"
],
"support": {
"source": "https://github.com/spatie/laravel-honeypot/tree/4.4.0"
},
"funding": [
{
"url": "https://spatie.be/open-source/support-us",
"type": "custom"
}
],
"time": "2023-12-01T10:30:39+00:00"
},
{
"name": "spatie/laravel-package-tools",
"version": "1.16.2",