Wire LadillLink through QrCode model and remaining QR surfaces.
Deploy Ladill Transfer / deploy (push) Successful in 31s
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>
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
use App\Models\QrCode;
|
||||
use App\Models\Transfer;
|
||||
use App\Models\TransferFile;
|
||||
use RuntimeException;
|
||||
@@ -16,6 +15,6 @@ class DirectTransferFileUrl
|
||||
throw new RuntimeException('Transfer file URL is unavailable.');
|
||||
}
|
||||
|
||||
return QrCode::publicBaseUrl().'/q/'.$shortCode.'/transfer/files/'.$file->id;
|
||||
return LadillLink::path($shortCode, 'transfer/files/'.$file->id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
/**
|
||||
* Canonical short-link URLs for the Ladill platform (ladl.link).
|
||||
*/
|
||||
final class LadillLink
|
||||
{
|
||||
public static function baseUrl(): string
|
||||
{
|
||||
$domain = (string) config('link.public_domain', 'ladl.link');
|
||||
|
||||
return 'https://'.$domain;
|
||||
}
|
||||
|
||||
public static function url(string $slug): string
|
||||
{
|
||||
return rtrim(self::baseUrl(), '/').'/'.ltrim($slug, '/');
|
||||
}
|
||||
|
||||
public static function path(string $slug, string $suffix): string
|
||||
{
|
||||
return self::url($slug).'/'.ltrim($suffix, '/');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user