本文整理汇总了PHP中Feedback::where方法的典型用法代码示例。如果您正苦于以下问题:PHP Feedback::where方法的具体用法?PHP Feedback::where怎么用?PHP Feedback::where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Feedback
的用法示例。
在下文中一共展示了Feedback::where方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update_feedback
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;
}
示例2: complain
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]);
}
示例3: feedback
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));
}