Files
ladill-link/app/Http/Controllers/Link/AnalyticsController.php
T
isaaccladandCursor 9516fcb9f3
Deploy Ladill Link / deploy (push) Successful in 37s
Expand Link app with analytics, settings, and custom domains.
Add Bitly-style branded domain support via Ladill Domains SSL API,
account analytics dashboard, settings page with default domain picker,
and fix SSO/dashboard issues from QR Plus template leftovers.

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

27 lines
855 B
PHP

<?php
namespace App\Http\Controllers\Link;
use App\Http\Controllers\Controller;
use App\Services\Link\LinkAnalyticsService;
use Illuminate\Http\Request;
use Illuminate\View\View;
class AnalyticsController extends Controller
{
public function __construct(private LinkAnalyticsService $analytics) {}
public function index(Request $request): View
{
$account = ladill_account();
return view('links.analytics.index', [
'summary' => $this->analytics->summaryForAccount($account),
'dailyClicks' => $this->analytics->dailyClicksForAccount($account, 30),
'topLinks' => $this->analytics->topLinksForAccount($account),
'recentClicks' => $this->analytics->recentClicksForAccount($account),
'referrers' => $this->analytics->referrersForAccount($account),
]);
}
}