Example #1
0
 /**
  * 验证数据完整性
  * 
  * @param array $data
  * @return boolean
  */
 protected function complete($data)
 {
     if (!$this->model->complete($data)) {
         $this->output->message(self::STATUS_NOTICE, '缺少必要字段' . '[' . implode(',', $this->model->incompleteFields) . ']');
         return false;
     }
     return true;
 }
 /**
  * Complete task
  *
  * @param  integer $id
  *
  * @return response
  */
 public function complete($id)
 {
     $this->task->complete($id);
     return back();
 }