BookStack\Services\SocialAuthService::detachSocialAccount PHP Method

detachSocialAccount() public method

Detach a social account from a user.
public detachSocialAccount ( $socialDriver ) : Illuminate\Http\RedirectResponse | Redirector
$socialDriver
return Illuminate\Http\RedirectResponse | Illuminate\Routing\Redirector
    public function detachSocialAccount($socialDriver)
    {
        session();
        user()->socialAccounts()->where('driver', '=', $socialDriver)->delete();
        session()->flash('success', title_case($socialDriver) . ' account successfully detached');
        return redirect(user()->getEditUrl());
    }