Operating mode in the admin (test mode sends all mail to a test recipient until switched live), bot protection for booking requests, mail rendering tests, mail:test command
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fdcb68d578
commit
d018c97be4
22 files changed
+698
-23
No files matched your search
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Support\Settings;
|
||||
use App\Support\StripImageMetadata;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Spatie\MediaLibrary\MediaCollections\Events\MediaHasBeenAddedEvent;
|
||||
@@ -24,10 +24,8 @@ public function register(): void
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
// Test environments: deliver every e-mail to one address only, so no guest gets test mails.
|
||||
if (filled(config('fewo.mail_redirect_to'))) {
|
||||
Mail::alwaysTo(config('fewo.mail_redirect_to'));
|
||||
}
|
||||
// Test mode (System › Betrieb, default until switched live): every e-mail goes to the test recipient only.
|
||||
Settings::applyMailRouting();
|
||||
|
||||
// Photos: remove metadata (GPS position, camera data) from uploaded originals, which stay downloadable.
|
||||
Event::listen(MediaHasBeenAddedEvent::class, fn (MediaHasBeenAddedEvent $event) => StripImageMetadata::strip($event->media));
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
use Filament\PanelProvider;
|
||||
use Filament\Support\Colors\Color;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\View\PanelsRenderHook;
|
||||
use Filament\Widgets\AccountWidget;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
||||
use Illuminate\Cookie\Middleware\EncryptCookies;
|
||||
use Illuminate\Foundation\Http\Middleware\PreventRequestForgery;
|
||||
@@ -58,6 +60,8 @@ public function panel(Panel $panel): Panel
|
||||
}),
|
||||
])
|
||||
->brandName('FeWo Stommer · Verwaltung')
|
||||
// As long as the site is not switched live, every page shows where the e-mails go.
|
||||
->renderHook(PanelsRenderHook::BODY_START, fn (): View => view('filament.test-mode-banner'))
|
||||
->navigationGroups(['Vermietung', 'Webseite', 'System'])
|
||||
->colors([
|
||||
'primary' => Color::Sky,
|
||||
|
||||
Reference in new issue
Block a user