diff --git a/app/Http/Controllers/Public/EventRegistrationController.php b/app/Http/Controllers/Public/EventRegistrationController.php index 2241583..b54f4a6 100644 --- a/app/Http/Controllers/Public/EventRegistrationController.php +++ b/app/Http/Controllers/Public/EventRegistrationController.php @@ -6,6 +6,7 @@ use App\Http\Controllers\Controller; use App\Models\QrCode; use App\Models\QrEventRegistration; use App\Services\Events\EventRegistrationService; +use App\Support\LadillLink; use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; @@ -44,10 +45,7 @@ class EventRegistrationController extends Controller 'paid' => $result['paid'], 'checkout_url' => $result['checkout_url'], 'badge_code' => $result['registration']->badge_code, - 'success_url' => route('qr.public.event.confirmed', [ - 'shortCode' => $qrCode->short_code, - 'ref' => $result['registration']->reference, - ]), + 'success_url' => LadillLink::path($qrCode->short_code, 'registered/'.$result['registration']->reference), ]); } @@ -56,18 +54,15 @@ class EventRegistrationController extends Controller $reference = (string) $request->query('reference', ''); if ($reference === '') { - return redirect('/q/' . $shortCode)->with('error', 'Missing payment reference.'); + return redirect()->away(LadillLink::url($shortCode))->with('error', 'Missing payment reference.'); } try { $registration = $this->eventService->complete($reference); - return redirect()->route('qr.public.event.confirmed', [ - 'shortCode' => $shortCode, - 'ref' => $registration->reference, - ]); + return redirect()->away(LadillLink::path($shortCode, 'registered/'.$registration->reference)); } catch (\Throwable $e) { - return redirect('/q/' . $shortCode)->with('order_error', 'Payment could not be verified. Reference: ' . $reference); + return redirect()->away(LadillLink::url($shortCode))->with('order_error', 'Payment could not be verified. Reference: ' . $reference); } } diff --git a/app/Http/Controllers/Public/QrScanController.php b/app/Http/Controllers/Public/QrScanController.php index 3fa3810..db8d519 100644 --- a/app/Http/Controllers/Public/QrScanController.php +++ b/app/Http/Controllers/Public/QrScanController.php @@ -36,7 +36,7 @@ class QrScanController extends Controller } if ($qrCode->isDocumentType()) { - return redirect()->route('qr.public.view', $shortCode); + return redirect()->away($qrCode->publicPath('view')); } if ($qrCode->isBookType()) { @@ -62,7 +62,7 @@ class QrScanController extends Controller return view('public.qr.document-viewer', [ 'qrCode' => $qrCode, - 'fileUrl' => route('qr.public.file', $shortCode), + 'fileUrl' => $qrCode->publicPath('file'), 'allowDownload' => (bool) ($qrCode->content()['allow_download'] ?? true), ]); } diff --git a/resources/views/events/badges.blade.php b/resources/views/events/badges.blade.php index b951707..bc18a42 100644 --- a/resources/views/events/badges.blade.php +++ b/resources/views/events/badges.blade.php @@ -3,7 +3,7 @@ $evColor = $c['brand_color'] ?? '#4f46e5'; $evName = $c['name'] ?? $qrCode->label; $hasLogo = !empty($c['logo_path']); - $logoUrl = $hasLogo ? route('qr.public.event.logo', $qrCode->short_code) : null; + $logoUrl = $hasLogo ? $qrCode->publicPath('event-logo') : null; $size = $c['badge_size'] ?? '4x3'; // Physical badge dimensions (inches) [$bw, $bh] = match ($size) { diff --git a/resources/views/public/qr/document-viewer.blade.php b/resources/views/public/qr/document-viewer.blade.php index b5f1845..3b66e75 100644 --- a/resources/views/public/qr/document-viewer.blade.php +++ b/resources/views/public/qr/document-viewer.blade.php @@ -111,7 +111,7 @@
{{ $qrCode->label }} @if($allowDownload) - + diff --git a/resources/views/qr-codes/badges.blade.php b/resources/views/qr-codes/badges.blade.php index b951707..bc18a42 100644 --- a/resources/views/qr-codes/badges.blade.php +++ b/resources/views/qr-codes/badges.blade.php @@ -3,7 +3,7 @@ $evColor = $c['brand_color'] ?? '#4f46e5'; $evName = $c['name'] ?? $qrCode->label; $hasLogo = !empty($c['logo_path']); - $logoUrl = $hasLogo ? route('qr.public.event.logo', $qrCode->short_code) : null; + $logoUrl = $hasLogo ? $qrCode->publicPath('event-logo') : null; $size = $c['badge_size'] ?? '4x3'; // Physical badge dimensions (inches) [$bw, $bh] = match ($size) {