<?php

namespace App\Controllers\PPDB;

use App\Controllers\BaseController;
use App\Models\PpdbSiswaModel;
use App\Models\PpdbStatusStepModel;

class Dashboard extends BaseController
{
    public function index()
    {
        $siswaModel  = new PpdbSiswaModel();
        $stepModel   = new PpdbStatusStepModel();

        $siswa = $siswaModel->find(session('ppdb_id'));

        $steps = $stepModel
            ->orderBy('step_order', 'ASC')
            ->findAll();

        return view('ppdb/dashboard', [
            'siswa' => $siswa,
            'steps' => $steps
        ]);
    }
}
