Created
January 15, 2020 12:27
-
-
Save cwicaksono/f91a6c0758c49d342e448e87a55c56b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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