From 99a0cdb013e1f51ad969b2f79f601082a54dff99 Mon Sep 17 00:00:00 2001 From: isaacclad Date: Sat, 4 Jul 2026 23:53:41 +0000 Subject: [PATCH] Add hero section to My Links index with wallet stats and balance gate. Co-authored-by: Cursor --- app/Http/Controllers/Link/LinkController.php | 5 ++ resources/views/links/index.blade.php | 69 ++++++++++++++++---- 2 files changed, 63 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/Link/LinkController.php b/app/Http/Controllers/Link/LinkController.php index dceb733..40790cd 100644 --- a/app/Http/Controllers/Link/LinkController.php +++ b/app/Http/Controllers/Link/LinkController.php @@ -32,10 +32,15 @@ class LinkController extends Controller ->latest() ->paginate(20); + $wallet = $account->getOrCreateLinkWallet(); + return view('links.index', [ 'links' => $links, + 'wallet' => $wallet, + 'balance' => $this->billing->balanceCedis($account), 'canCreate' => $this->billing->canCreate($account), 'pricePerLink' => \App\Models\LinkWallet::pricePerLink(), + 'topupUrl' => ladill_account_url('wallet'), ]); } diff --git a/resources/views/links/index.blade.php b/resources/views/links/index.blade.php index 38a825d..a7b2ad8 100644 --- a/resources/views/links/index.blade.php +++ b/resources/views/links/index.blade.php @@ -1,21 +1,68 @@ My Links -
-
-
-

My Links

-

Create and manage your ladl.link short URLs

+ +
+ @foreach(['success', 'error'] as $flash) + @if(session($flash)) +
+

{{ session($flash) }}

+
+ @endif + @endforeach + +
+
+
+
+
+
+ Short links · Click analytics · ladl.link +
+

My Links

+

+ Create branded short URLs on ladl.link, track clicks, and manage destinations from one place. +

+
+ +
+
+ +
+
+

GHS {{ number_format($balance, 2) }}

+

Account balance

+
+
+

{{ number_format($links->total()) }}

+

Links

+
+
+

{{ number_format($wallet->clicks_total) }}

+

Total clicks

+
+
+
- - Create link -
-
+
+
+

All links

+
@if($links->isEmpty())
-

No links yet. Create your first short link on ladl.link.

+

No links yet. Create your first short link on ladl.link.

@else