403 Forbidden: The server understood the request but refuses to authorise it. 403 Forbidden means the server knows who you are but refuses the request. You are logged in, but your account lacks permission for this action or resource. The classic example is a normal user trying to open an admin page, or a customer trying to view another customer's invoice. Logging in again will not help. The permission itself has to change.
Permission checks belong on the server, for every request. Hiding a button in the interface is not security, because anyone can send the request directly. In Laravel, policies and gates make these checks explicit and testable. For very sensitive resources, some applications return 404 instead of 403, so they do not even confirm that the resource exists. That choice is deliberate and worth documenting.
Use when an HTTP request returns an unexpected status code (4xx or 5xx, or a redirect loop), when a user pastes an error like "419 Page Expired", "422 Unprocessable Content", "502 Bad Gateway" or "CORS error", or when debugging API calls between a frontend and a Laravel/PHP or Node backend. Finds the cause from the status code, headers and logs before changing code.
Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues.
OWASP Top 10 security audit and secure coding guidelines for Laravel + React/Inertia.js applications. Use when auditing for vulnerabilities ("run OWASP audit", "security review", "check my app security") or writing secure Laravel code involving auth, payments, file uploads, or API design. Triggers on security-related tasks, payment handling, authentication, or any request to audit a Laravel codeba