Пример #1
0
 /**
  * Registering gcm into related contributor.
  *
  * @param Request $request
  * @return mixed
  */
 public function registerGcm(Request $request)
 {
     $contributor = new Contributor();
     $userId = $request->input('id');
     if ($userId != null && $userId != 0) {
         $contributor->registerGcmToken($userId, $request->input('gcm_token'));
     }
     return response()->json(['request_id' => uniqid(), 'status' => 'success', 'message' => $request->input('gcm_token'), 'timestamp' => Carbon::now()]);
 }