<?php

namespace App\Models;

use CodeIgniter\Model;

class M_user extends Model
{
    protected $table = 'users'; // pastikan tabel bernama 'users'
    protected $primaryKey = 'id';
    protected $allowedFields = [
    'username', 'password', 'nama', 'role', 'id_guru', 'photo',
    'no_hp', 'email', 'agama', 'alamat', 'tempat_lahir', 'tanggal_lahir', 'jenis_kelamin'
];

public function getTotalUser()
    {
        return $this->countAll();
    }
}

    