Files
ladill-link/app/Http/Controllers/Link/OverviewController.php
T
isaaccladandCursor f1fe749934
Deploy Ladill Link / deploy (push) Successful in 29s
Aggregate ladl.link slugs from all platform apps in the link list.
Sync QR and storefront short codes from sibling apps via a platform catalog API so My Links shows every ladl.link URL in one place.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 13:26:16 +00:00

35 lines
867 B
PHP

<?php
namespace App\Http\Controllers\Link;
use App\Http\Controllers\Controller;
use App\Models\ShortLink;
use App\Services\Link\LinkCatalogSyncService;
use Illuminate\View\View;
class OverviewController extends Controller
{
public function __construct(
private LinkCatalogSyncService $catalogSync,
) {}
public function index(): View
{
$account = ladill_account();
$this->catalogSync->syncForUser($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(),
]);
}
}