Fix payment QR preview rendering using inline data URIs.
Deploy Ladill Mini / deploy (push) Successful in 44s
Deploy Ladill Mini / deploy (push) Successful in 44s
Match Events/QR Plus pattern so QR images render without a separate authenticated preview URL, and add a styled preview card on the show page. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -32,7 +32,14 @@ class PaymentQrController extends Controller
|
||||
->latest()
|
||||
->get();
|
||||
|
||||
return view('mini.payment-qrs.index', ['qrCodes' => $qrCodes]);
|
||||
$previewDataUris = $qrCodes->mapWithKeys(function (QrCode $qr) {
|
||||
return [$qr->id => $this->imageGenerator->previewDataUri($qr)];
|
||||
});
|
||||
|
||||
return view('mini.payment-qrs.index', [
|
||||
'qrCodes' => $qrCodes,
|
||||
'previewDataUris' => $previewDataUris,
|
||||
]);
|
||||
}
|
||||
|
||||
public function create(): View
|
||||
@@ -67,7 +74,12 @@ class PaymentQrController extends Controller
|
||||
{
|
||||
$this->authorizePaymentQr($paymentQr);
|
||||
|
||||
return view('mini.payment-qrs.show', ['qrCode' => $paymentQr]);
|
||||
$previewDataUri = $this->imageGenerator->previewDataUri($paymentQr);
|
||||
|
||||
return view('mini.payment-qrs.show', [
|
||||
'qrCode' => $paymentQr->fresh(),
|
||||
'previewDataUri' => $previewDataUri,
|
||||
]);
|
||||
}
|
||||
|
||||
public function update(Request $request, QrCode $paymentQr): RedirectResponse
|
||||
|
||||
Reference in New Issue
Block a user