protected function updateFromProvider($user, $socialUser)
    {
        if (! $user->hasProvider($this->provider->driver)) {
            return $user->addSocial($socialUser, $this->provider->driver);
        }

        return $user->getProvider($this->provider->driver)
            ->updateFromProvider($socialUser, $this->provider->driver);
    }
protected function updateFromProvider($user, $socialUser)
    {
        if (! $user->hasProvider($this->provider->driver)) {
            return $user->addSocial($socialUser, $this->provider->driver);
        }

        return $user->getProvider($this->provider->driver)
            ->updateFromProvider($socialUser, $this->provider->driver);
    }
protected function updateFromProvider ( $ user , $ socialUser ) { if ( ! $ user -> hasProvider ( $ this -> provider -> driver ) ) { return $ user -> addSocial ( $ socialUser , $ this -> provider -> driver ) ; } return $ user -> getProvider ( $ this -> provider -> driver ) -> updateFromProvider ( $ socialUser , $ this -> provider -> driver ) ; }
Either update an existing provider record with the newest details
or add this provider to the user.

@param null|\App\Models\User                $user
@param null|\Laravel\Socialite\AbstractUser $socialUser

@return mixed
Either update an existing provider record with the newest details or add this provider to the user .