<?php

namespace App\Controllers;

use App\Models\Setting;

class HomeController {
    public function index() {
        $settingModel = new Setting();
        $siteSettings = $settingModel->getAll();
        
        // Default values if not set
        if (!isset($siteSettings['institute_name'])) $siteSettings['institute_name'] = 'Smart Tuitions';
        if (!isset($siteSettings['institute_logo'])) $siteSettings['institute_logo'] = null;
        
        require_once __DIR__ . '/../../views/welcome.php';
    }
}
