public function put_index() { $data = file_get_contents('php://input'); $temp = json_decode($data); $new = MODEL::find($temp->id); SAVE_FIELDS; $new->save(); $array = array('success' => 'true'); $json = json_encode($array); return $json; }
public function put_index() { $data = file_get_contents('php://input'); $temp = json_decode($data); $new = MODEL::find($temp->id); $new->DEFAULT_FIELD = $temp->text; $new->PARENT_ID = $temp->parentId; $new->save(); $array = array('success' => 'true'); $json = json_encode($array); return $json; }