public function getListRateMean($userId) { if (is_null($userId)) { return array('status' => 304); } else { $result = RateReport::select('reportId', 'type')->where('userId', $userId)->get(); return array('status' => 200, 'result' => $result); } }
public function deleteReportMeanMobile($userId, $reportId) { if (ReportMean::where('userId', $userId)->where('reportId', $reportId)->where('type', 1)->delete()) { RateReport::where('reportId', $reportId)->delete(); return array('status' => 200); } else { return array('status' => 304); } }