phpsa/laravel-postman
Generate Postman collections from your Laravel routes automatically. This package scans your API endpoints and exports ready-to-import collections, keeping docs in sync with your codebase.
api/v1 → api/v2), consumer-facing integrations, or onboarding external/FE/QA teams onto your endpoints, this directly reduces the sync tax. If your API surface is stable and small, the roadmap justification is weak.FormRequest, one auth-protected route) exported and scored for fidelity. That pilot result — what fraction of routes come out correct — is the go/no-go input, and it is cheap to obtain.Consider it when:
Route:: declarations, and controllers are conventional (resourceful/invokable, typed signatures, dedicated FormRequest classes). Fidelity depends directly on those conventions being present.api/v1/*).require-dev package, a published config, and one artisan command. No runtime footprint, no migrations, no production blast radius.v5.1.0...v5.2.0 diff — the release notes contain only a compare link, no changelog.Look elsewhere when:
sometimes, nullable, required_if, arrays-of-objects, and Rule:: objects translate imperfectly, and there is no oneOf or rich examples. If OpenAPI fidelity is the requirement, an OpenAPI-first generator is the correct category.To executives (one paragraph): This is a small, free, developer-only Laravel utility that automatically generates the Postman collection we currently maintain by hand. It carries zero production risk — it is a dev dependency invoked by a command, never loaded at runtime — and the upside is that our API test collection stops drifting from the actual endpoints, which shortens QA cycles and frontend integration work. The cost is one engineer for roughly a sprint's worth of part-time effort to pilot it on one API area, plus a small recurring maintenance line. The caveat I want on record: it is a single-maintainer open-source project with very low adoption, its latest release ships without a changelog, and it infers request shapes from validation rules rather than a real schema — so we pilot before we commit, and we keep the integration shallow enough to swap for an alternative.
To engineering leadership: Low effort, low blast radius, non-zero ongoing cost. Install as require-dev, publish config, run the export, and score coverage and correctness on one bounded context (routes, params, auth, example payloads). The gate is fidelity: if the generated spec is confidently wrong rather than loudly broken, it is worse than nothing, because consumers will trust it. We sequence: read the v5.1.0→v5.2.0 diff and pin explicitly; pilot one route group; decide the artifact policy (recommendation: CI artifact plus a scheduled diff report rather than a committed file); automate via Composer script and CI step, failing only on generator errors for the first quarter; then broaden. Ownership sits with backend platform, not feature teams.
To the API consumers (frontend, QA, integrators): You get an importable Postman collection and environment generated from the live route definitions, so endpoints, base URLs, and auth headers stay aligned with the code rather than with someone's memory. Two things to understand: the collection is generated, not authored — corrections belong in the Laravel code, not in Postman, or they will be overwritten on the next run; and path parameters come through as raw IDs, so expect to seed a few records and set collection variables ({{user_id}}) before requests resolve. Uploads and non-JSON bodies are excluded and will be supplied separately as hand-maintained requests.
The honest risk statement to include in any pitch: 9 stars, one maintainer, a release with no descriptive notes, and inferred — not specified — schemas. Adopt it because the pilot on one bounded context proved the fidelity is good enough for our API, and because the exit cost is a config file and a single command invocation. Do not adopt it because it is free.
How can I help you explore Laravel packages today?