<?php

namespace App\Controllers\SuperAdmin;

use App\Controllers\BaseController;
use App\Models\LicenseKeyModel;

class Dashboard extends BaseController
{
    public function index()
    {
        $licenseModel = new LicenseKeyModel();
        
        $data = [
            'totalLicenses' => $licenseModel->countAll(),
            'activeLicenses' => $licenseModel->where('status', 'active')->countAllResults(),
            'expiredLicenses' => $licenseModel->where('status', 'expired')->countAllResults(),
        ];
        
        return view('superadmin/dashboard', $data);
    }
}
