diff --git a/src/resources/views/emails/auth/welcome.blade.php b/src/resources/views/emails/auth/welcome.blade.php new file mode 100644 index 0000000..011935e --- /dev/null +++ b/src/resources/views/emails/auth/welcome.blade.php @@ -0,0 +1,86 @@ +@extends('emails.layout') + +@section('content') + +{{-- Icon --}} +
|
+ |
+
+ Dein Konto ist bestätigt. Hier ist, was du als Nächstes tun kannst. +
+ +{{-- Feature list --}} +
+
|
+ ||
+
|
+ ||
+
|
+
| - - aziros + |
+
+ |
|
+ |
+
+ Hallo {{ $user->name }}, wir haben deine Kündigung des {{ $plan }}-Plans erhalten. +
+ +{{-- Access info --}} +@if(!empty($endsAt)) +Zugang aktiv bis
+{{ $endsAt->format('d.m.Y') }}
+Danach wechselst du automatisch auf den kostenlosen Plan.
+Du wechselst sofort auf den kostenlosen Plan.
++ Falls du eine Frage hast, antworte einfach auf diese E-Mail. +
+ +@endsection diff --git a/src/resources/views/emails/subscription/confirmed.blade.php b/src/resources/views/emails/subscription/confirmed.blade.php new file mode 100644 index 0000000..929d8b8 --- /dev/null +++ b/src/resources/views/emails/subscription/confirmed.blade.php @@ -0,0 +1,59 @@ +@extends('emails.layout') + +@section('content') + +{{-- Icon --}} +|
+ |
+
+ Hallo {{ $user->name }}, dein {{ $plan }}-Plan ist jetzt aktiv. +
+ +{{-- Details card --}} +| Plan | +{{ $plan }} | +
| Abrechnungszeitraum | +{{ $billing === 'yearly' ? 'Jährlich' : 'Monatlich' }} | +
| Betrag | +{{ number_format($amount / 100, 2, ',', '.') }} € / {{ $billing === 'yearly' ? 'Jahr' : 'Monat' }} | +
| Nächste Verlängerung | +{{ $renewsAt->format('d.m.Y') }} | +
+ Du kannst dein Abo jederzeit unter Einstellungen → Abonnement kündigen. +
+ +@endsection diff --git a/src/routes/web.php b/src/routes/web.php index 514a353..913e069 100644 --- a/src/routes/web.php +++ b/src/routes/web.php @@ -113,6 +113,28 @@ Route::middleware(['user', 'role:admin'])->prefix('admin')->name('admin.')->grou 'name' => 'Aria – Verfasste E-Mail', 'data' => ['body' => "Hallo!\n\nIch habe deine Aufgabe erledigt und hier ist die Zusammenfassung der Ergebnisse für dein Meeting morgen.\n\nBitte prüfe die Agenda und gib mir Bescheid, ob noch Änderungen nötig sind."], ], + 'auth.welcome' => [ + 'name' => 'Willkommen', + 'data' => ['user' => (object)['name' => 'Max Mustermann']], + ], + 'subscription.confirmed' => [ + 'name' => 'Abo bestätigt', + 'data' => [ + 'user' => (object)['name' => 'Max Mustermann'], + 'plan' => 'Pro', + 'billing' => 'monthly', + 'amount' => 1900, + 'renewsAt' => \Carbon\Carbon::now()->addMonth(), + ], + ], + 'subscription.cancelled' => [ + 'name' => 'Abo gekündigt', + 'data' => [ + 'user' => (object)['name' => 'Max Mustermann'], + 'plan' => 'Pro', + 'endsAt' => \Carbon\Carbon::now()->addDays(14), + ], + ], ]; Route::get('/mail-preview', function () use ($fakeData) { @@ -123,7 +145,7 @@ Route::middleware(['user', 'role:admin'])->prefix('admin')->name('admin.')->grou Route::get('/mail-preview/{template}', function (string $template) use ($fakeData) { abort_unless(isset($fakeData[$template]), 404); $entry = $fakeData[$template]; - $view = 'emails.' . str_replace('.', '/', str_replace('-', '-', $template)); + $view = 'emails.' . $template; return response(view($view, $entry['data'])); })->name('mail-preview.show'); });