essejblack / laravel-postman-exporter
Export Laravel routes and FormRequest validation rules as a Postman collection.
Package info
github.com/essejblack/laravel-postman-exporter
pkg:composer/essejblack/laravel-postman-exporter
v1.0.0
2026-06-03 13:47 UTC
Requires
- php: ^8.2
- illuminate/console: ^10.0|^11.0|^12.0|^13.0
- illuminate/filesystem: ^10.0|^11.0|^12.0|^13.0
- illuminate/routing: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
Requires (Dev)
- laravel/framework: ^10.0|^11.0|^12.0|^13.0
- orchestra/testbench: ^8.0|^9.0|^10.0|^11.0
README
Export Laravel API routes and FormRequest validation rules as a Postman Collection v2.1 JSON file.
Installation
composer require essejblack/laravel-postman-exporter
Publish Config
php artisan vendor:publish --tag=postman-exporter-config
Usage
php artisan postman:export --pretty
The collection will be exported to:
storage/app/postman/api_collection.json
Features
- Export Laravel API routes
- Export route parameters as Postman variables
- Extract FormRequest validation rules
- Generate sample request bodies
- Configure default values from published config
- Bearer token collection auth
- Postman Collection v2.1 output
Config
After publishing the config file, edit:
config/postman-exporter.php
You can configure:
- collection name
- base URL
- auth token variable
- default headers
- route parameter samples
- request body sample values
- excluded routes
- PUT/PATCH behavior
License
MIT