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

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:12 +00:00
co-authored by Cursor
parent de2eab7ef8
commit a3029d475d
5 changed files with 12 additions and 16 deletions
@@ -6,6 +6,7 @@ use App\Http\Controllers\Controller;
use App\Models\QrCode;
use App\Services\Merchant\BookingSlotService;
use App\Services\Merchant\MerchantSaleService;
use App\Support\LadillLink;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
@@ -63,10 +64,7 @@ class BookingController extends Controller
return response()->json([
'confirmed' => true,
'redirect_url' => route('qr.public.booking.confirmed', [
'shortCode' => $shortCode,
'booking' => $result['booking']->id,
]),
'redirect_url' => LadillLink::path($shortCode, 'booking/confirmed/'.$result['booking']->id),
]);
}
@@ -74,19 +72,16 @@ class BookingController extends Controller
{
$reference = trim((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 {
$booking = $this->sales->completeBooking($reference);
} catch (\Throwable) {
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);
}
return redirect()->route('qr.public.booking.confirmed', [
'shortCode' => $shortCode,
'booking' => $booking->id,
]);
return redirect()->away(LadillLink::path($shortCode, 'booking/confirmed/'.$booking->id));
}
public function confirmed(string $shortCode, int $booking): View
@@ -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->isBookingType()) {
@@ -66,7 +66,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),
]);
}
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Public;
use App\Http\Controllers\Controller;
use App\Models\QrCode;
use App\Services\Merchant\MerchantSaleService;
use App\Support\LadillLink;
use App\Support\Qr\QrTypeCatalog;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
@@ -59,13 +60,13 @@ class SaleOrderController extends Controller
{
$reference = trim((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 {
$order = $this->sales->completeOrder($reference);
} catch (\Throwable) {
return redirect('/q/'.$shortCode)->with('order_error', 'Payment could not be verified. Contact the merchant with reference: '.$reference);
return redirect()->away(LadillLink::url($shortCode))->with('order_error', 'Payment could not be verified. Contact the merchant with reference: '.$reference);
}
return view('public.qr.order-success', [
@@ -46,7 +46,7 @@ class MerchantSaleService
$amountMinor = (int) round($amountGhs * 100);
$reference = 'MCHT-'.strtoupper(Str::random(16));
$orgName = $qrCode->content()['name'] ?? $qrCode->label ?? 'Storefront';
$callbackUrl = route('qr.public.order.callback', ['shortCode' => $qrCode->short_code]);
$callbackUrl = \App\Support\LadillLink::path($qrCode->short_code, 'order/callback');
$order = QrSaleOrder::create([
'qr_code_id' => $qrCode->id,
+1 -1
View File
@@ -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) {