Files
ladill-transfer/app/Support/DirectTransferFileUrl.php
T
isaaccladandCursor a171276bc2
Deploy Ladill Transfer / deploy (push) Successful in 31s
Wire LadillLink through QrCode model and remaining QR surfaces.
Public URLs, encoded payloads, slug preview, payment callbacks, and asset paths now use ladl.link instead of ladill.com/q/*.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 16:16:25 +00:00

21 lines
502 B
PHP

<?php
namespace App\Support;
use App\Models\Transfer;
use App\Models\TransferFile;
use RuntimeException;
class DirectTransferFileUrl
{
public static function for(Transfer $transfer, TransferFile $file): string
{
$shortCode = $transfer->qrCode?->short_code;
if ($shortCode === null || $shortCode === '') {
throw new RuntimeException('Transfer file URL is unavailable.');
}
return LadillLink::path($shortCode, 'transfer/files/'.$file->id);
}
}