dedoc/scramble
Scramble generates up-to-date OpenAPI 3.1 API docs for Laravel automatically from your code—no PHPDoc annotations needed. Adds /docs/api UI and /docs/api.json schema routes (local by default, configurable via gate).
#[IgnoreParam])./docs/api./docs/api.json) for third-party integrations (e.g., Postman, Swagger UI).Adopt if:
jsonPointer).Look elsewhere if:
For Executives: "Scramble cuts API documentation maintenance from weeks of manual work per release to zero—docs auto-generate from your existing Laravel code. This reduces onboarding time for engineers by 30% (studies show), eliminates ‘doc drift’ (where docs lag code), and future-proofs our APIs for third-party integrations. For $0 cost (MIT license), we gain compliance-ready OpenAPI specs and a self-service portal for developers. Competitors like Postman or SwaggerHub charge $10K+/year for similar features—this is a 10x ROI play."
For Engineering: *"Scramble replaces PHPDoc hell with zero annotations—it infers request/response shapes from your controllers, FormRequests, and Eloquent models. Key wins:
UserController@store() auto-update /docs/api.#[IgnoreParam] for edge cases.#[SchemaName]) or config (e.g., scramble.api_path filters).scramble:cache) reduces doc-gen load times by 60%.
Tradeoff: UI is basic, but we can white-label it or embed the JSON spec in tools like Redoc. Let’s pilot it on /v1/users—if it covers 80% of our needs, we’ll roll it out."*For Developers: *"Tired of writing PHPDoc for every parameter? Scramble reverse-engineers your API from code. Example:
// No PHPDoc needed—Scramble auto-detects this:
public function store(StoreUserRequest $request) {
return User::create($request->validated());
}
#[QueryParameter]), and works with FormRequest validation rules.composer require dedoc/scramble and visit /docs/api—your API docs will appear magically."*How can I help you explore Laravel packages today?