public static function update_feedback($params) { $params['date'] = date('Y-m-d h:i:s', time()); $feedback = Feedback::where('id', $params['id']); $feedback->update($params); $details = $feedback->get(); return $details; }
public function complain() { $type = Input::get("type", "all"); $perPage = 10; if ($type == "treated") { $feedbacks = Feedback::where("type", "=", "3")->where("status", "=", 1)->with('user_info')->paginate($perPage); } else { if ($type == "untreated") { $feedbacks = Feedback::where("type", "=", "3")->where("status", "=", 0)->with('user_info')->paginate($perPage); } else { $feedbacks = Feedback::where("type", "=", "3")->with('user_info')->paginate($perPage); } } $totalCount = $feedbacks->getTotal(); $count = $feedbacks->count(); $feedbacks->addQuery('type', $type); return View::make('pages.admin.service-center.feedback', ["count" => $count, "feedbacks" => $feedbacks, "totalCount" => $totalCount]); }
public function feedback() { $feedbackId = Input::get("feedbackId"); $result = Feedback::where("feedback_id", "=", $feedbackId)->update(["status" => true]); if (!$result) { return Response::json(array('errCode' => 1, 'errMsg' => "[数据库错误]找不到该条反馈信息")); } return Response::json(array('errCode' => 0)); }