Ejemplo n.º 1
0
 public function postRegister(RegisterRequest $request)
 {
     //      $ipCode = inet_pton($request->getClientIp());
     $ipCode = $request->getClientIp();
     $user_w_ip_exists = $this->ipExists($ipCode);
     if ($user_w_ip_exists) {
         $user_w_ip_exists->delete();
         Image::where('ip', $ipCode)->delete();
         Session::flash('message', "No cheating bro!! You're disqualified now!! ");
         Session::flash('alert-class', 'error');
         return redirect()->route('home');
     } else {
         $user = $this->create($request);
         return redirect()->route('getUpload', $user->id);
     }
 }