Endpoint
HTTP Method
API Endpoint
Authentication
This endpoint requires authentication (usesauth middleware).
Include the session cookie in the request.
Request Body
No request body parameters required.Response
No Content - Logout successful. Session has been invalidated.
Example Request
cURL
Next.js
Success Response
Error Responses
Unauthenticated (401)
Returned when no valid session exists:Notes
- The user is logged out using
Auth::guard('web')->logout() - The session is invalidated, destroying all session data
- The CSRF token is regenerated for security
- The session cookie is cleared in the response
- After logout, the user must login again to access protected endpoints
- This endpoint is safe to call even if the session has already expired