Use ladl.link URLs for all front-facing QR and short-link surfaces.
Deploy Ladill Events / deploy (push) Successful in 26s

Public landing pages, asset paths, payment callbacks, and redirects now go through QrCode::publicPath() / LadillLink instead of ladill.com/q/* routes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-27 15:46:17 +00:00
co-authored by Cursor
parent 5bc3b3a064
commit ceaa9ba8dc
5 changed files with 10 additions and 15 deletions
@@ -6,6 +6,7 @@ use App\Http\Controllers\Controller;
use App\Models\QrCode; use App\Models\QrCode;
use App\Models\QrEventRegistration; use App\Models\QrEventRegistration;
use App\Services\Events\EventRegistrationService; use App\Services\Events\EventRegistrationService;
use App\Support\LadillLink;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
@@ -44,10 +45,7 @@ class EventRegistrationController extends Controller
'paid' => $result['paid'], 'paid' => $result['paid'],
'checkout_url' => $result['checkout_url'], 'checkout_url' => $result['checkout_url'],
'badge_code' => $result['registration']->badge_code, 'badge_code' => $result['registration']->badge_code,
'success_url' => route('qr.public.event.confirmed', [ 'success_url' => LadillLink::path($qrCode->short_code, 'registered/'.$result['registration']->reference),
'shortCode' => $qrCode->short_code,
'ref' => $result['registration']->reference,
]),
]); ]);
} }
@@ -56,18 +54,15 @@ class EventRegistrationController extends Controller
$reference = (string) $request->query('reference', ''); $reference = (string) $request->query('reference', '');
if ($reference === '') { if ($reference === '') {
return redirect('/q/' . $shortCode)->with('error', 'Missing payment reference.'); return redirect()->away(LadillLink::url($shortCode))->with('error', 'Missing payment reference.');
} }
try { try {
$registration = $this->eventService->complete($reference); $registration = $this->eventService->complete($reference);
return redirect()->route('qr.public.event.confirmed', [ return redirect()->away(LadillLink::path($shortCode, 'registered/'.$registration->reference));
'shortCode' => $shortCode,
'ref' => $registration->reference,
]);
} catch (\Throwable $e) { } 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);
} }
} }
@@ -36,7 +36,7 @@ class QrScanController extends Controller
} }
if ($qrCode->isDocumentType()) { if ($qrCode->isDocumentType()) {
return redirect()->route('qr.public.view', $shortCode); return redirect()->away($qrCode->publicPath('view'));
} }
if ($qrCode->isBookType()) { if ($qrCode->isBookType()) {
@@ -62,7 +62,7 @@ class QrScanController extends Controller
return view('public.qr.document-viewer', [ return view('public.qr.document-viewer', [
'qrCode' => $qrCode, 'qrCode' => $qrCode,
'fileUrl' => route('qr.public.file', $shortCode), 'fileUrl' => $qrCode->publicPath('file'),
'allowDownload' => (bool) ($qrCode->content()['allow_download'] ?? true), 'allowDownload' => (bool) ($qrCode->content()['allow_download'] ?? true),
]); ]);
} }
+1 -1
View File
@@ -3,7 +3,7 @@
$evColor = $c['brand_color'] ?? '#4f46e5'; $evColor = $c['brand_color'] ?? '#4f46e5';
$evName = $c['name'] ?? $qrCode->label; $evName = $c['name'] ?? $qrCode->label;
$hasLogo = !empty($c['logo_path']); $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'; $size = $c['badge_size'] ?? '4x3';
// Physical badge dimensions (inches) // Physical badge dimensions (inches)
[$bw, $bh] = match ($size) { [$bw, $bh] = match ($size) {
@@ -111,7 +111,7 @@
<div id="toolbar"> <div id="toolbar">
<span class="tb-label">{{ $qrCode->label }}</span> <span class="tb-label">{{ $qrCode->label }}</span>
@if($allowDownload) @if($allowDownload)
<a href="{{ route('qr.public.file', $qrCode->short_code) }}" download class="tb-download"> <a href="{{ $qrCode->publicPath('file') }}" download class="tb-download">
<svg fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"> <svg fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"/> <path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"/>
</svg> </svg>
+1 -1
View File
@@ -3,7 +3,7 @@
$evColor = $c['brand_color'] ?? '#4f46e5'; $evColor = $c['brand_color'] ?? '#4f46e5';
$evName = $c['name'] ?? $qrCode->label; $evName = $c['name'] ?? $qrCode->label;
$hasLogo = !empty($c['logo_path']); $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'; $size = $c['badge_size'] ?? '4x3';
// Physical badge dimensions (inches) // Physical badge dimensions (inches)
[$bw, $bh] = match ($size) { [$bw, $bh] = match ($size) {