<?php namespace App\Models\Admin;

class ConfigModel extends AdminModel{
	private $table;
	
    public function __construct(){
		parent::__construct();
		$this->table = "config";
    }
	
	public function get($config_id){
		$builder = $this->db->table($this->table);
		$query = $builder->where('config_id',$config_id)->get();
		return $query->getRowArray();
	}
	
	public function update($data, $config_id){
		$this->add_update_log($data);
		$builder = $this->db->table($this->table);
		$builder->where('config_id',$config_id);
		$builder->update($data);
	}
}