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:
@@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user