Skip to content

Instantly share code, notes, and snippets.

@cwicaksono
Created January 15, 2020 12:27
Show Gist options
  • Save cwicaksono/f91a6c0758c49d342e448e87a55c56b6 to your computer and use it in GitHub Desktop.
Save cwicaksono/f91a6c0758c49d342e448e87a55c56b6 to your computer and use it in GitHub Desktop.
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Categories_model extends MY_Model {
protected $table = 'categories';
protected $key = 'id';
protected $soft_deletes = false;
protected $date_format = 'datetime';
protected $set_created = false;
protected $set_modified = false;
public function __construct()
{
parent::__construct();
}
public function getAll(){
return $this->db->select('*')
->from('categories')
->get()
->result();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment