laravel logout
//make a route as a post and button should look like this
<form action="{{ route('logout') }}" method="post">
@csrf
<button type="submit">Logout</button>
</form>
//Controller will be like this.
public function store(){
auth()->logout();
return redirect()->route('home');
}