Description
Create a new endpoint called test/protected
Add the new endpoint to the sanctum middleware in routes
Acceptance criteria
Authorized Access: The endpoint should only be accessible to authenticated users with valid tokens.
Permission Handling: Access should be denied with an appropriate error response if a user without the required permissions attempts to access the endpoint.
Response Status: The endpoint should return a 401 Unauthorized response when accessed by an unauthenticated user and a 403 Forbidden response if accessed by a user without the necessary permissions.
Description Create a new endpoint called test/protected Add the new endpoint to the sanctum middleware in routes
Acceptance criteria