authenticate(); $request->session()->regenerate(); return redirect('/dashboard'); } /** * Destroy an authenticated session. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\RedirectResponse */ public function destroy(Request $request) { Auth::guard('web')->logout(); $request->session()->invalidate(); $request->session()->regenerateToken(); return redirect('/'); } }