Files
ladill-link/resources/views/links/dashboard.blade.php
T
isaaccladandCursor d9c91ad7d8 Add Ladill Link URL shortener on ladl.link.
Management UI at link.ladill.com with GHS 0.05 per link wallet billing,
click analytics, and legacy fallback to ladill.com/q for QR ecosystem codes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 10:58:41 +00:00

51 lines
2.8 KiB
PHP

<x-layouts.user :title="'Dashboard'">
<div class="mx-auto max-w-5xl space-y-6">
<div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
<div>
<h1 class="text-2xl font-semibold text-slate-900">Overview</h1>
<p class="mt-1 text-sm text-slate-500">Short links on <span class="font-medium text-emerald-700">ladl.link</span> GHS {{ number_format($pricePerLink, 2) }} per link</p>
</div>
<a href="{{ route('user.links.create') }}"
class="inline-flex items-center justify-center rounded-lg bg-emerald-600 px-4 py-2 text-sm font-semibold text-white hover:bg-emerald-700">
Create link
</a>
</div>
<div class="grid gap-4 sm:grid-cols-3">
<div class="rounded-xl border border-slate-200 bg-white p-5">
<p class="text-sm text-slate-500">Links created</p>
<p class="mt-1 text-3xl font-semibold text-slate-900">{{ number_format($wallet->links_total) }}</p>
</div>
<div class="rounded-xl border border-slate-200 bg-white p-5">
<p class="text-sm text-slate-500">Total clicks</p>
<p class="mt-1 text-3xl font-semibold text-slate-900">{{ number_format($wallet->clicks_total) }}</p>
</div>
<div class="rounded-xl border border-slate-200 bg-white p-5">
<p class="text-sm text-slate-500">Price per link</p>
<p class="mt-1 text-3xl font-semibold text-emerald-700">GHS {{ number_format($pricePerLink, 2) }}</p>
</div>
</div>
@if($recentLinks->isNotEmpty())
<div class="rounded-xl border border-slate-200 bg-white">
<div class="border-b border-slate-100 px-5 py-4">
<h2 class="font-semibold text-slate-900">Recent links</h2>
</div>
<ul class="divide-y divide-slate-100">
@foreach($recentLinks as $link)
<li class="flex items-center justify-between gap-4 px-5 py-3">
<div class="min-w-0">
<a href="{{ route('user.links.show', $link) }}" class="font-medium text-slate-900 hover:text-emerald-700">
{{ $link->label ?: $link->slug }}
</a>
<p class="truncate text-sm text-emerald-600">{{ $link->publicUrl() }}</p>
</div>
<span class="shrink-0 text-sm text-slate-500">{{ number_format($link->clicks_total) }} clicks</span>
</li>
@endforeach
</ul>
</div>
@endif
</div>
</x-layouts.user>