original_string: public function updateUserRecordWithLastlogin($userId) {
  
          $now = Carbon::now();
          $ip  = $this->request->getClientIp();
  
          DB::table('users')
              ->where('id', $userId)
              ->update(['last_login' => $now, 'last_login_ip' => $ip] )
          ;
      }
code: public function updateUserRecordWithLastlogin($userId) {
  
          $now = Carbon::now();
          $ip  = $this->request->getClientIp();
  
          DB::table('users')
              ->where('id', $userId)
              ->update(['last_login' => $now, 'last_login_ip' => $ip] )
          ;
      }
code_tokens: public function updateUserRecordWithLastlogin ( $ userId ) { $ now = Carbon :: now ( ) ; $ ip = $ this -> request -> getClientIp ( ) ; DB :: table ( 'users' ) -> where ( 'id' , $ userId ) -> update ( [ 'last_login' => $ now , 'last_login_ip' => $ ip ] ) ; }
docstring: UPDATE the user record for fields "last_login" and "last_login_ip"
  
  This method is here because it is convenient, as this class is already injected in the auth classes
  
  @param  int    $userId          User ID
  @return void
docstring_tokens: UPDATE the user record for fields last_login and last_login_ip