Use short ladill.com/q links for transfer shares and emails.
Deploy Ladill Transfer / deploy (push) Successful in 55s
Deploy Ladill Transfer / deploy (push) Successful in 55s
Share URLs and API public_url values again use the platform domain so ladill.com/q/* forwards to transfer.ladill.com like other Ladill apps. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -139,7 +139,7 @@ class ChunkedUploadController extends Controller
|
||||
'data' => [
|
||||
'id' => $transfer->id,
|
||||
'title' => $transfer->title,
|
||||
'public_url' => $transfer->qrCode?->shareUrl(),
|
||||
'public_url' => $transfer->qrCode?->publicUrl(),
|
||||
'paid_until' => $transfer->paid_until?->toIso8601String(),
|
||||
'expires_at' => $transfer->paid_until?->toIso8601String(),
|
||||
'files' => $transfer->files->map(fn ($file) => [
|
||||
|
||||
@@ -68,7 +68,7 @@ class TransferController extends Controller
|
||||
'data' => [
|
||||
'id' => $transfer->id,
|
||||
'title' => $transfer->title,
|
||||
'public_url' => $transfer->qrCode?->shareUrl(),
|
||||
'public_url' => $transfer->qrCode?->publicUrl(),
|
||||
'paid_until' => $transfer->paid_until?->toIso8601String(),
|
||||
'expires_at' => $transfer->paid_until?->toIso8601String(),
|
||||
'files' => $transfer->files->map(fn ($file) => [
|
||||
|
||||
@@ -86,14 +86,6 @@ class QrCode extends Model
|
||||
return self::publicBaseUrl() . '/q/' . $this->short_code;
|
||||
}
|
||||
|
||||
/** Direct link for emails and share UI — always on the Transfer app host. */
|
||||
public function shareUrl(): string
|
||||
{
|
||||
$base = rtrim((string) config('app.url'), '/');
|
||||
|
||||
return $base . '/q/' . $this->short_code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Base URL for public QR links. Always the short platform domain
|
||||
* (ladill.com) — never the signed-in account/product host — so printed
|
||||
|
||||
@@ -24,7 +24,7 @@ class TransferRecipientNotification extends Notification
|
||||
public function toMail(mixed $notifiable): MailMessage
|
||||
{
|
||||
$transfer = $this->transfer->loadMissing(['files', 'qrCode', 'user']);
|
||||
$publicUrl = $transfer->qrCode?->shareUrl() ?? '';
|
||||
$publicUrl = $transfer->qrCode?->publicUrl() ?? '';
|
||||
|
||||
return (new MailMessage())
|
||||
->subject($this->subjectLine())
|
||||
|
||||
Reference in New Issue
Block a user