Config.php 565 Bytes
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Config extends CI_Controller {
    public function index()
    {
        $this->load->view('config/index');
    }

    public function add()
    {
        $this->load->view('config/add');
    }

    public function edit($id = null)
    {
        $res = json_decode(file_get_contents($this->config->item('apiBaseUrl') . 'config/product/' . $id));
        $data = $res->data;
        $arr = array(
            'data'=>$data
        );
        $this->load->view('config/edit',$arr);
    }
}