<?php
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\PromoCode;
use Illuminate\Support\Facades\Cookie;
use App\Models\PaymentMethod;
use Laravel\Socialite\Facades\Socialite;

class MyAccountController extends Controller {

    public function index(Request $request){

        return view('app.my-account.log-in-settings');
    }
    
    public function logInSettings(Request $request){
        return view('app.my-account.log-in-settings');
    }

    public function enableGoogleLogIn(Request $request){
        $request->session()->put('user_uid_to_enable_google_log_in', $this->user->uid);
        return Socialite::driver('google')->redirect();
    }

    public function enableFacebookLogIn(Request $request){
        $request->session()->put('user_uid_to_enable_facebook_log_in', $this->user->uid);
        return Socialite::driver('facebook')->redirect();
    }
}
