- How do I install rakutentech/laravel-request-docs in a Laravel app?
- Install it with Composer, publish the package config file, and open the documentation route (by default /request-docs) in your browser. There are no migrations or service contracts to implement, and you do not need to change existing controllers to get baseline documentation. The package reads your existing routes, FormRequests, controller docblocks, and Eloquent model metadata to build the docs.
- Which Laravel versions does laravel-request-docs support, including Laravel 13?
- The package tracks Laravel's annual release cadence, and version 2.44 added a Laravel 13.x compatibility update authored by Laravel Shift. That is a positive sustainability signal, but it should be treated as a green test matrix rather than proof of feature-level testing against every Laravel 13 minor. Verify it against your exact Laravel 13 minor, PHP version, and any framework internals the package touches, such as the router and model reflection.
- Is it safe to run laravel-request-docs in production?
- This is the dominant risk: the package enumerates every route, model field, and validation rule, which is effectively an attack-surface map. The documentation route and its middleware must be explicitly gated by environment, and that gate should be verified in your deployed staging and production config rather than assumed locally. Confirm whether the route is disabled by default when APP_ENV=production and adopt an explicit gating pattern instead of relying on memory.
- How does laravel-request-docs generate documentation without manual annotations?
- It introspects Laravel's router and Eloquent metadata at dev time, then renders a UI from discovered routes, controller docblocks, FormRequest validation rules, and model attributes. Baseline value comes from code that already exists, so no annotations are required to get started. Richer descriptions and example responses come from docblocks and saved example payloads, which are opt-in and can be adopted route by route.
- Can I exclude sensitive routes, models, or fields from the generated documentation?
- The package includes configuration for controlling what gets documented, but the evaluation flags exclusion of sensitive routes, models, and fields as something to confirm against the documentation for your specific version. Plan to audit the generated output before sharing it, especially in applications with internal admin routes or sensitive model attributes. If granular exclusion is insufficient, gate the entire documentation route to local and staging environments.
- Does laravel-request-docs export OpenAPI or Swagger specs?
- The package is primarily a UI-first documentation browser rather than a spec-generation tool. First-class OpenAPI/Swagger export is an open question in the technical evaluation, so verify current capabilities before relying on it for contract testing or API gateway import. If you need a spec artifact, you may need a companion tool alongside this package.
- Should I install laravel-request-docs as require-dev or ship it disabled?
- Because it is a dev-time introspection layer over the router and Eloquent metadata and does not sit in the production request path, it fits naturally as a require-dev dependency used locally and in staging. Shipping it disabled is also viable, but that decision increases the importance of verifying the environment gate in deployed config. The main architectural choice is simply which of those two models your team prefers.
- How should I handle sensitive data in saved example responses?
- Saved example responses are typically written to a storage directory that teams commit so the docs are reproducible, and real captured payloads routinely contain tokens, PII, or internal identifiers. You need a review discipline rather than relying on the tool alone. Scrub or replace sensitive values before committing examples, and treat generated documentation artifacts like any other code change that goes through review.
- How does laravel-request-docs perform on large Laravel apps with many routes?
- The generation strategy for large route sets, whether on-demand rendering or a pre-generated artifact, is an open question worth verifying for your application size. Baseline generation is derived from existing code and requires no schema changes, so a pilot is realistic in under a day. For very large route sets, test the documentation route's response time and consider pre-generating the artifact if supported.
- What are alternatives to laravel-request-docs, such as Scribe or Scramble?
- Scribe and Scramble are commonly evaluated alongside this package for Laravel API documentation. laravel-request-docs differentiates itself by deriving docs from routes, FormRequests, and API Resources with no annotations or extra config required. Compare them on your need for OpenAPI export, exclusion controls, production gating, and how well each handles your existing code shape before committing.