コード例 #1
0
 public function postRsvp()
 {
     $all = $this->request->all();
     if (isset($all['google_id'])) {
         try {
             $user = User::where('google_id', $all['google_id'])->firstOrFail();
             $msg = MessageGenerator::buildRSVPResponse($user, $all);
             return Response::json(['error' => false, 'msg' => $msg], 200);
         } catch (ModelNotFoundException $e) {
             return $this->_error('I do not know who you are. Therefore you cannot RSVP. Sorry.');
         }
     }
 }