Teilen-Funktion: Öffentliche Share-Seite mit OG-Meta-Tags und Share-Button

- Öffentliche Route /e/{event} für Social-Media-Crawler (WhatsApp, Facebook)
- Share-View mit OG-Meta-Tags (Titel, Datum, Bild) für Link-Vorschau
- Teilen-Button auf Event-Detailseite (Web Share API + Clipboard-Fallback)
- Buttons: Teilen (helles Blau) + Bearbeiten (Standard-Blau)
- Hinweistext mit 3,5s Anzeige nach Link-Kopieren
- Event-Typ-Logos als neue Bilddateien

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Rhino
2026-03-03 11:53:11 +01:00
parent f9abc4561e
commit 7726fffb79
10 changed files with 214 additions and 3 deletions

View File

@@ -134,4 +134,20 @@ class EventController extends Controller
return view('events.show', compact('event', 'userChildIds', 'userChildren', 'myCatering', 'myTimekeeper', 'myCarpool', 'cateringHistory', 'timekeeperHistory'));
}
/**
* Öffentliche Share-Seite mit OG-Meta-Tags für Social-Media-Vorschau.
*/
public function share(Event $event): View
{
// Nur veröffentlichte/abgesagte Events (keine Entwürfe)
if ($event->status === EventStatus::Draft) {
abort(404);
}
$event->load('team');
$appName = Setting::get('app_name', config('app.name'));
return view('events.share', compact('event', 'appName'));
}
}