Download the PHP package oooiik/laravel-export-postman without Composer
On this page you can find all versions of the php package oooiik/laravel-export-postman. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download oooiik/laravel-export-postman
More information about oooiik/laravel-export-postman
Files in oooiik/laravel-export-postman
Package laravel-export-postman
Short Description Automatically generate a Postman collection based on your API routes.
License MIT
Homepage https://github.com/oooiik/laravel-export-postman
Informations about the package laravel-export-postman
Laravel Export to Postman
[!WARNING] This repository is archived and is no longer maintained.
Development continues in oooiik/laravel-apiforge — a full rewrite that exports Laravel routes to OpenAPI / Swagger (primary) and Postman, with complete validation rules, response examples, and domain-based grouping.
This package stays on Packagist so existing installations keep working, but it will not receive further updates or bug fixes. New projects should use
oooiik/laravel-apiforge.
Generate a Postman Collection v2.1 from your Laravel API routes — with a single Artisan command.
Annotate your controllers with simple PHPDoc tags to control authentication, headers, descriptions, and even Postman pre-request and test scripts. The output is a ready-to-import JSON collection — no manual route copying, no drift between code and docs.
Features
- 🚀 One-command export —
php artisan postman:exportand you're done - 🔐 Auth support — Bearer tokens, no-auth, parent-inherited, per-endpoint
- 📝 Rich annotations — descriptions, headers, scripts via standard PHPDoc
- 📂 External file sources — load descriptions and scripts from
base_path()orresource_path() - ⚡ Pre-request & test scripts — inject Postman JavaScript directly from your code
- 🎯 Folder grouping — collections organized by route prefix
- 🧩 Laravel 6 → 12 — broad compatibility, PHP 7.1+ through 8.x
Requirements
- PHP 7.1 or higher
- Laravel 6.x — 12.x
Installation
Publish the config (optional):
Quick Start
Export your routes to a Postman collection:
The collection file will be created in your configured storage path. Import it into Postman → File → Import.
Configuration
Edit config/export-postman.php after publishing:
Annotation Reference
Add PHPDoc annotations to your controller methods or closures to enrich the generated collection.
Authentication
| Annotation | Description |
|---|---|
@AuthNo |
No authentication for this endpoint |
@AuthParent |
Inherit authentication from the parent folder |
@AuthBearer [token] |
Use a Bearer token (literal value or Postman variable) |
Headers
Use @Header key => value for custom request headers. Multiple @Header annotations are supported.
Descriptions
Three flavors — inline, file from base_path(), file from resource_path(). They can be combined.
| Annotation | Source |
|---|---|
@DescriptionContext [text] |
Inline markdown text |
@DescriptionBasePath [path] |
File path relative to base_path() |
@DescriptionResourcePath [path] |
File path relative to resource_path() |
Pre-request Scripts
Inject Postman JavaScript that runs before the request is sent. Useful for token refresh, signature generation, or dynamic variables.
| Annotation | Source |
|---|---|
@PreRequestScriptContext [js] |
Inline JavaScript |
@PreRequestScriptFileBasePath [path] |
JS file relative to base_path() |
@PreRequestScriptFileResourcePath [path] |
JS file relative to resource_path() |
Test Scripts
Inject Postman JavaScript that runs after the response is received. Use for assertions or extracting values into environment variables.
| Annotation | Source |
|---|---|
@TestScriptContext [js] |
Inline JavaScript |
@TestScriptFileBasePath [path] |
JS file relative to base_path() |
@TestScriptFileResourcePath [path] |
JS file relative to resource_path() |
Full Example
Compatibility Matrix
| Laravel | PHP | Status |
|---|---|---|
| 12.x | 8.2+ | ✅ Supported |
| 11.x | 8.2+ | ✅ Supported |
| 10.x | 8.1+ | ✅ Supported |
| 9.x | 8.0+ | ✅ Supported |
| 8.x | 7.3+ | ✅ Supported |
| 7.x | 7.2.5+ | ✅ Supported |
| 6.x | 7.2+ | ✅ Supported |
Contributing
This repository is archived — pull requests and issues here will not be reviewed.
Please open your feature ideas, bug reports, and questions in the successor project: oooiik/laravel-apiforge → Issues.
Credits
- Obidjon Toshev — author & maintainer
- All contributors
License
The MIT License (MIT). See LICENSE for details.
All versions of laravel-export-postman with dependencies
ext-json Version *
illuminate/config Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/console Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/contracts Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/support Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/routing Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0