Make Ladill Link short URLs fully dynamic at click time.
Deploy Ladill Link / deploy (push) Successful in 1m55s

Forward query strings and path suffixes to the live destination, resolve public hosts from config/custom domains instead of hardcoding ladl.link, and keep proxy Location rewrites on the visitor host.
This commit is contained in:
isaacclad
2026-07-16 20:05:43 +00:00
parent a9ddd600db
commit d45f4b5c58
14 changed files with 195 additions and 28 deletions
+7 -3
View File
@@ -1,10 +1,10 @@
<x-user-layout>
<x-slot name="title">Create Link</x-slot>
<div class="mx-auto max-w-xl space-y-6">
<div class="mx-auto max-w-xl space-y-6" x-data="{ slug: @js(old('custom_slug', '')) }">
<div>
<h1 class="text-2xl font-semibold text-slate-900">Create short link</h1>
<p class="mt-1 text-sm text-slate-500">
Your link will be published on <span class="font-medium text-emerald-700">ladl.link</span>.
Your link will be published on <span class="font-medium text-emerald-700">{{ $publicHost }}</span>.
GHS {{ number_format($pricePerLink, 2) }} will be debited from your wallet.
</p>
</div>
@@ -35,11 +35,15 @@
<div>
<label for="custom_slug" class="block text-sm font-medium text-slate-700">Custom slug (optional)</label>
<div class="mt-1 flex rounded-lg shadow-sm">
<span class="inline-flex items-center rounded-l-lg border border-r-0 border-slate-300 bg-slate-50 px-3 text-sm text-slate-500">ladl.link/</span>
<span class="inline-flex items-center rounded-l-lg border border-r-0 border-slate-300 bg-slate-50 px-3 text-sm text-slate-500">{{ $publicHost }}/</span>
<input type="text" name="custom_slug" id="custom_slug" value="{{ old('custom_slug') }}"
pattern="[a-z0-9][a-z0-9-]{1,18}[a-z0-9]"
x-model="slug"
class="block w-full rounded-r-lg border-slate-300 focus:border-emerald-500 focus:ring-emerald-500">
</div>
<p class="mt-1.5 text-xs text-slate-400" x-show="slug" x-cloak>
Preview: <span class="font-medium text-emerald-700" x-text="'{{ $publicBaseUrl }}/' + slug"></span>
</p>
@error('custom_slug')<p class="mt-1 text-sm text-red-600">{{ $message }}</p>@enderror
</div>