<?php

namespace App\Models\Panel;

use CodeIgniter\Model;

class Display extends Model
{

    public function countSiswa()
    {
        $builder = $this->db->table('m_siswa');
        return $builder->countAll();
    }
    public function countGuru()
    {
        $builder = $this->db->table('users');
        $builder->join('users_roles', 'user_id = id');
        $builder->where('role_id', 2);
        return $builder->countAllResults();
    }
    public function countKelas()
    {
        $builder = $this->db->table('m_kelas');
        return $builder->countAll();
    }
}
