<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class LogoutController extends Controller
{
    public function trialLogout(Request $request)
    {
        auth()->guard('trial-account')->logout();
        $request->session()->invalidate();
        return redirect()->route('trial-account.login-view');
    }

    public function paidLogout(Request $request)
    {
        auth()->guard('paid-account')->logout();
        $request->session()->invalidate();
        return redirect()->route('paid-account.login-view');
    }


    public function masterDealerLogout(Request $request)
    {
        auth()->guard('master-dealer')->logout();
        $request->session()->invalidate();
        return redirect()->route('master-dealer.login-view');
    }

    public function subDealerLogout(Request $request)
    {
        auth()->guard('sub-dealer')->logout();
        $request->session()->invalidate();
        return redirect()->route('sub-dealer.login-view');
    }

    public function adminLogout(Request $request)
    {
        auth()->guard('admin')->logout();
        $request->session()->invalidate();
        return redirect()->route('admin.login-view');
    }
}
