I am new in laravel(using version 8) and working on "Logout section" but unable to logout,still getting email in session (after logout),How can i logout ? Here is my view file
<a class="dropdown-item" href="{{ route('logout') }}">
<i class="typcn typcn-power text-primary"></i>
Logout
</a>
Here is my Routes(web.php)
Route::get('logout', [AdminController::class, 'logout'])->name('logout');
Here is my controller code,How can i logout ? Thank you in advance.
function logout()
{
Auth()->logout();
return redirect('/')->with('logout_message', 'You have been logged out');;
}