Use ladl.link URLs for all front-facing QR and short-link surfaces.
Deploy Ladill Events / deploy (push) Successful in 26s
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
<div id="toolbar">
|
||||
<span class="tb-label">{{ $qrCode->label }}</span>
|
||||
@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">
|
||||
<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>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user