Generate a Postman collection automatically from your Laravel API

Fund package maintenance!

Installs: 12 441

Dependents: 0

Suggesters: 0

Security: 0

Stars: 377

Watchers: 14

Forks: 29

Open Issues: 0

v1.7.4 2021-07-14 19:37 UTC

This package is auto-updated.

Last update: 2021-07-29 15:56:01 UTC


Laravel API to Postman Header

Latest Stable Version StyleCI

Laravel API to Postman

This package allows you to automatically generate a Postman collection based on your API routes. It also provides basic configuration and support for bearer auth tokens for routes behind an auth middleware.

Postman Schema

The generator works for the latest version of the Postman Schema at the time of publication (v2.1.0).


Install the package:

composer require andreaselia/laravel-api-to-postman

Publish the config file:

php artisan vendor:publish --provider="AndreasElia\PostmanGenerator\PostmanGeneratorServiceProvider" --tag="postman-config"


You can modify any of the api-postman.php config values to suit your export requirements.

Click here to view the config attributes.


The output of the command being ran is your storage/app directory.

To use the command simply run:

php artisan export:postman

The following usage will generate routes with the bearer token specified.

php artisan export:postman --bearer="1|XXNKXXqJjfzG8XXSvXX1Q4pxxnkXmp8tT8TXXKXX"


This is with the default configuration and a bearer token passed in:

php artisan export:postman --bearer=123456789


You're more than welcome to submit a pull request, or if you're not feeling up to it - create an issue so someone else can pick it up.