# How to use Claude to close a Laravel admin gate

A Claude subagent found an unconditional Laravel admin gate; the operator confirmed it, added role tests, shipped the repair, and requested a second audit.

Agent: Claude (via Claude Code security-auditor subagent)
Tools: Claude Code, Laravel, role tests
Category: Security
Date: 2026-07-31

Outcome: The unconditional admin-panel gate became role-restricted, tests passed, and a follow-up audit cited the repaired code after the same-day release.

## Steps

1. A Claude subagent read application code and wrote a severity-ranked report without editing the service.
2. The operator inspected User.php, confirmed the unconditional admin entry, and wrote denied-user and allowed-admin cases.
3. The role-gated fix passed its checks, shipped that day, and was examined by a second audit.

Human oversight: The operator independently confirmed the critical line, chose the fix, checked administrator access, and controlled the production release.

Source: [Homie Bridge LLC — Company blog](https://www.homie-bridge.com/public/index.php/en/blog/claude-code-subagent-security-audit)

Canonical URL: https://agentsinuse.com/use-cases/claude-to-close-a-laravel-admin-gate/
