function approve($id) { if ($_POST) { $executive = new Executive($id); $_POST['approve_id'] = $this->session->userdata('id'); $executive->approve_date = date("Y-m-d H:i:s"); $executive->from_array($_POST); $executive->save(); echo approve_comment($executive); } }
public function postExecutive() { $exe = new Executive(); $exe->ex_name = Input::get('ex_name'); $exe->location = Input::get('location'); $exe->save(); return Response::json($exe); }