<?php namespace App\Models\Front;

class CustomerModel{
	protected $db;
	protected $session;
	protected $project;
	
    public function __construct(){
        $this->db = \Config\Database::connect();
		$this->session = session();
		$this->project = config('Config\\Project');
    }
	
	public function get_customer_course($customer_course_id){
		$builder = $this->db->table('view_customer_course');
		$query = $builder->where('customer_course_id',$customer_course_id)
			->get();
		return $query->getRowArray();
	}
	
	public function insert_record($table,$data){
		$builder = $this->db->table($table);
		$builder->insert($data);
		return $this->db->insertID();
	}
}	