Initial commit: Any-LLM Gateway with Laravel Admin Interface
- Any-LLM Gateway setup with Docker Compose - Laravel 11 admin interface with Livewire - Dashboard with usage statistics and charts - Gateway Users management with budget tracking - API Keys management with revocation - Budget templates with assignment - Usage Logs with filtering and CSV export - Model Pricing management with calculator - PostgreSQL database integration - Complete authentication system for admins
This commit is contained in:
33
laravel-app/app/Http/Controllers/DashboardController.php
Normal file
33
laravel-app/app/Http/Controllers/DashboardController.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Services\StatisticsService;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
private StatisticsService $statsService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Display the dashboard
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$stats = $this->statsService->getDashboardStats();
|
||||
$dailyUsage = $this->statsService->getDailyUsageChart(30);
|
||||
$topUsers = $this->statsService->getTopUsers(5);
|
||||
$providerStats = $this->statsService->getUsageByProvider(30);
|
||||
$modelStats = $this->statsService->getUsageByModel(30);
|
||||
|
||||
return view('dashboard', compact(
|
||||
'stats',
|
||||
'dailyUsage',
|
||||
'topUsers',
|
||||
'providerStats',
|
||||
'modelStats'
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user