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>
29 lines
674 B
PHP
29 lines
674 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Link;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\ShortLink;
|
|
use Illuminate\View\View;
|
|
|
|
class OverviewController extends Controller
|
|
{
|
|
public function index(): View
|
|
{
|
|
$account = ladill_account();
|
|
$wallet = $account->getOrCreateLinkWallet();
|
|
|
|
$recentLinks = ShortLink::query()
|
|
->where('user_id', $account->id)
|
|
->latest()
|
|
->limit(5)
|
|
->get();
|
|
|
|
return view('links.dashboard', [
|
|
'wallet' => $wallet,
|
|
'recentLinks' => $recentLinks,
|
|
'pricePerLink' => \App\Models\LinkWallet::pricePerLink(),
|
|
]);
|
|
}
|
|
}
|