Ejemplo n.º 1
0
 /**
  * Update Informasi [[cName]]
  *
  * @param $id
  *
  * @return mixed
  */
 public function update($id)
 {
     /**
      * test
      */
     $db = $this->locations->find($id);
     /*==========  Sesuaikan  ==========*/
     //		$db->name      = Input::get('name');
     $db->info = Input::get('info');
     //		$db->parent_id = Input::get('parent_id');
     $db->uuid = uniqid('Update_');
     $saved = $db->save();
     return $saved ? Response::json(array_merge($db->toArray(), array('success' => $saved))) : \Icsoutput::msgError(array('reason' => 'Cannot Update'));
 }