12-05-2026 Frontend dev
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run

This commit is contained in:
Kevin Adametz 2026-05-12 18:32:33 +02:00
parent 405df0a122
commit 5b8bdf4182
779 changed files with 480564 additions and 6241 deletions

62
routes/customer.php Normal file
View file

@ -0,0 +1,62 @@
<?php
use App\Http\Controllers\LegacyInvoicePdfController;
use App\Http\Middleware\EnsureUserIsCustomer;
use App\Http\Middleware\LogSlowAdminRequests;
use Illuminate\Support\Facades\Route;
use Livewire\Volt\Volt;
// ============================================================
// "Mein Bereich" Eigentümer-Sicht im gemeinsamen Admin-Panel
// URL-Prefix: /admin/me/*
// Routen-Name: me.*
// Zugriff: Rollen admin, editor, customer (alle eingeloggten Panel-User)
// ============================================================
Route::middleware(['auth', 'verified', EnsureUserIsCustomer::class, LogSlowAdminRequests::class])
->prefix('admin/me')
->name('me.')
->group(function () {
Volt::route('/', 'customer.dashboard')->name('dashboard');
Volt::route('press-releases', 'customer.press-releases.index')->name('press-releases.index');
Volt::route('press-releases/create', 'customer.press-releases.create')->name('press-releases.create');
Volt::route('press-releases/{id}', 'customer.press-releases.show')->name('press-releases.show');
Volt::route('press-releases/{id}/edit', 'customer.press-releases.edit')->name('press-releases.edit');
Volt::route('firmen', 'customer.press-kits.index')->name('press-kits.index');
Volt::route('firmen/{id}', 'customer.press-kits.show')->name('press-kits.show');
Route::redirect('pressemappen', '/admin/me/firmen', 301);
Route::get('pressemappen/{id}', fn (string $id) => redirect("/admin/me/firmen/{$id}", 301))
->where('id', '[0-9]+');
Volt::route('buchungen-add-ons', 'customer.bookings')->name('bookings.index');
Volt::route('invoices', 'customer.invoices')->name('invoices.index');
Route::get('legacy-invoices/{legacyInvoice}/pdf', LegacyInvoicePdfController::class)->name('invoices.pdf');
Volt::route('tokens', 'customer.tokens')->name('tokens.index');
Volt::route('profile', 'customer.profile')->name('profile');
Volt::route('security', 'customer.security')->name('security');
});
// ============================================================
// Legacy /customer/*-Pfade als 301-Redirect erhalten,
// damit Bookmarks und alte Mails weiter funktionieren.
// ============================================================
Route::prefix('customer')->group(function () {
Route::redirect('/', '/admin/me', 301);
Route::redirect('press-releases', '/admin/me/press-releases', 301);
Route::redirect('press-releases/create', '/admin/me/press-releases/create', 301);
Route::get('press-releases/{id}', fn (string $id) => redirect("/admin/me/press-releases/{$id}", 301))
->where('id', '[0-9]+');
Route::get('press-releases/{id}/edit', fn (string $id) => redirect("/admin/me/press-releases/{$id}/edit", 301))
->where('id', '[0-9]+');
Route::redirect('pressemappen', '/admin/me/firmen', 301);
Route::get('pressemappen/{id}', fn (string $id) => redirect("/admin/me/firmen/{$id}", 301))
->where('id', '[0-9]+');
Route::redirect('buchungen-add-ons', '/admin/me/buchungen-add-ons', 301);
Route::redirect('invoices', '/admin/me/invoices', 301);
Route::redirect('tokens', '/admin/me/tokens', 301);
Route::redirect('profile', '/admin/me/profile', 301);
Route::redirect('security', '/admin/me/security', 301);
});