public function store() { $user = $this->auth(); if ($user->nickname == '' || $user->schoolId == '' || $user->avatarUrl == '') { return $this->outputError('请完善用户信息', 3); } $w = Wish::where('creatorId', $user->_id)->where('createdTime', '>=', Carbon::today())->orderBy('createdTime', 'desc')->count(); if ($w >= 3) { return $this->outputError('一天只能发3个', 2); } $data = Input::get(); $data['creatorId'] = Session::get('uid'); $result = Wish::create($data); return $this->output(new \stdClass()); }