src/Http/Controllers/Adminarea/SocialAuthenticationController.php
protected function getLocalUser(string $provider, string $providerUserId)
    {
        return app('cortex.auth.admin')->whereHas('socialites', function (Builder $builder) use ($provider, $providerUserId) {
            $builder->where('provider', $provider)->where('provider_uid', $providerUserId);
        })->first();
    }
protected function getLocalUser(string $provider, string $providerUserId)
    {
        return app('cortex.auth.admin')->whereHas('socialites', function (Builder $builder) use ($provider, $providerUserId) {
            $builder->where('provider', $provider)->where('provider_uid', $providerUserId);
        })->first();
    }
protected function getLocalUser ( string $ provider , string $ providerUserId ) { return app ( 'cortex.auth.admin' ) -> whereHas ( 'socialites' , function ( Builder $ builder ) use ( $ provider , $ providerUserId ) { $ builder -> where ( 'provider' , $ provider ) -> where ( 'provider_uid' , $ providerUserId ) ; } ) -> first ( ) ; }
Get local user for the given provider.

@param string $provider
@param string $providerUserId

@return \Illuminate\Database\Eloquent\Model|null
Get local user for the given provider .