Deploy Ladill Link / deploy (push) Successful in 37s
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>
27 lines
855 B
PHP
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),
|
|
]);
|
|
}
|
|
}
|