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

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:27 +00:00
co-authored by Cursor
parent c989c1460f
commit c4e1ac19c6
5 changed files with 41 additions and 31 deletions
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Public;
use App\Http\Controllers\Controller;
use App\Models\QrCode;
use App\Services\Give\GiveDonationService;
use App\Support\LadillLink;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
@@ -53,15 +54,15 @@ class DonationController 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 {
$donation = $this->donations->complete($reference);
} catch (RuntimeException $e) {
return redirect('/q/'.$shortCode)->with('order_error', $e->getMessage());
return redirect()->away(LadillLink::url($shortCode))->with('order_error', $e->getMessage());
} catch (\Throwable) {
return redirect('/q/'.$shortCode)->with('order_error', 'Payment could not be verified. Contact the organisation with reference: '.$reference);
return redirect()->away(LadillLink::url($shortCode))->with('order_error', 'Payment could not be verified. Contact the organisation with reference: '.$reference);
}
return view('public.qr.donation-confirmed', [
@@ -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),
]);
}