Deploy Ladill Transfer / deploy (push) Successful in 31s
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>
21 lines
502 B
PHP
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);
|
|
}
|
|
}
|