Use ladl.link URLs for all front-facing QR and short-link surfaces.
Deploy Ladill Mini / deploy (push) Successful in 39s
Deploy Ladill Mini / deploy (push) Successful in 39s
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:
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Public;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\QrCode;
|
||||
use App\Services\Mini\MiniPaymentService;
|
||||
use App\Support\LadillLink;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -49,13 +50,13 @@ class PaymentController 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 {
|
||||
$payment = $this->payments->complete($reference);
|
||||
} catch (RuntimeException $e) {
|
||||
return redirect('/q/'.$shortCode)->with('error', $e->getMessage());
|
||||
return redirect()->away(LadillLink::url($shortCode))->with('error', $e->getMessage());
|
||||
}
|
||||
|
||||
return view('public.qr.payment-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()) {
|
||||
@@ -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),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user