undefined property codeigniter
07:40 18 Sep 2017

I am learning CodeIgniter and I started making my own website but I got these errors.

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Kategori::$kategori_model

Filename: admin/Kategori.php

Line Number: 13

Backtrace:

File: C:\xampp\htdocs\Geekindo\application\controllers\admin\Kategori.php Line: 13 Function: _error_handler

File: C:\xampp\htdocs\Geekindo\index.php Line: 315 Function: require_once

Kategori class

defined('BASEPATH') OR exit('No direct script access allowed');

class Kategori extends CI_Controller
{

    public function __construct()
    {
        parent::__construct();
        $this->load->model('Kategori_model');
    }
    public function index()
    {
        $kategori = $this->kategori_model->listing();
        $data = array(
            'title' => 'Kategori post',
            'header' => 'List kategori berita',
            'kategori' => $kategori,
            'isi' => 'kategori_post/list'
        );
        $this->load->view('admin/wrapper', $data, FALSE);
    }

}

Kategori_model class

defined('BASEPATH') OR exit('No direct script access allowed');

class Kategori_model extends CI_Model {


        public function __construct()
        {
            parent::__construct();
            $this->load->database();
        }

        public function listing()
        {
            $this->db->select('*');
            $this->db->from('kategori_post');
            $this->db->order_by('nama_kategori_post','desc');

            $query = $this->db->get();
            return $query->result_array();
        }
        public function get_by($id)     
        {
            $this->db->where('kategori_post_id', $id);
            $query = $this->db->get('kategori_post');
            return $query->row_array();
        }

}
php codeigniter codeigniter-3