<!DOCTYPE html>
<html>
<head>
    <title>Logging out...</title>
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Create a form
            const form = document.createElement('form');
            form.method = 'POST';
            form.action = '{{ route("logout") }}';
            
            // Add CSRF token
            const csrfInput = document.createElement('input');
            csrfInput.type = 'hidden';
            csrfInput.name = '_token';
            csrfInput.value = document.querySelector('meta[name="csrf-token"]').content;
            form.appendChild(csrfInput);
            
            // Submit the form
            document.body.appendChild(form);
            form.submit();
        });
    </script>
</head>
<body>
    <p>Logging out, please wait...</p>
</body>
</html>
