<?php

namespace App\Controllers\Admin;

use App\Controllers\BaseController;

class Dashboard extends BaseController
{
    public function index()
{
    $model = new \App\Models\SchoolInfoModel();

    // pakai 1 baris saja (id=1)
    $row = $model->find(1);
    if (!$row) {
        $model->insert(['id' => 1]);
        $row = $model->find(1);
    }

    return view('admin/dashboard', [
        'title' => 'Dashboard',
        'row'   => $row,
    ]);
}
}
