PHPackages                             andreaselia/laravel-api-to-postman - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. andreaselia/laravel-api-to-postman

ActiveLibrary[API Development](/categories/api)

andreaselia/laravel-api-to-postman
==================================

Generate a Postman collection automatically from your Laravel API

v2.3.0(2mo ago)1.0k586.2k—5.8%1063MITPHPPHP ^7.4|^8.0CI passing

Since Dec 24Pushed 2mo ago19 watchersCompare

[ Source](https://github.com/andreaselia/laravel-api-to-postman)[ Packagist](https://packagist.org/packages/andreaselia/laravel-api-to-postman)[ GitHub Sponsors](https://github.com/andreaselia)[ GitHub Sponsors](https://github.com/tomirons)[ RSS](/packages/andreaselia-laravel-api-to-postman/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (18)Versions (46)Used By (3)

[![Laravel API to Postman Header](/header.png)](/header.png)

[![Latest Stable Version](https://camo.githubusercontent.com/eb906773ffb0ff85c2b5d7f76980f2594489026b04b74707e611260884c75a9d/68747470733a2f2f706f7365722e707567782e6f72672f616e6472656173656c69612f6c61726176656c2d6170692d746f2d706f73746d616e2f76)](//packagist.org/packages/andreaselia/laravel-api-to-postman)[![StyleCI](https://camo.githubusercontent.com/89dfc3ad30dc94bb65022cd9d94d12afc648058e7a207b3d8e8c1e27cf978f85/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3332333730393639352f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/323709695?branch=master)

Laravel API to Postman
======================

[](#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 and basic auth for routes behind an auth middleware.

For `POST` and `PUT` requests that utilizes a FormRequest, you can optionally scaffold the request, and publish rules in raw or human readable format.

Postman Schema
--------------

[](#postman-schema)

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

Installation
------------

[](#installation)

Install the package:

```
composer require andreaselia/laravel-api-to-postman
```

Publish the config file:

```
php artisan vendor:publish --provider="AndreasElia\PostmanGenerator\PostmanGeneratorServiceProvider"
```

Configuration
-------------

[](#configuration)

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

Click [here](/config/api-postman.php) to view the config attributes.

Usage
-----

[](#usage)

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"
```

The following usage will generate routes with the basic auth specified.

```
php artisan export:postman --basic="username:password123"
```

If both auths are specified, bearer will be favored.

Examples
--------

[](#examples)

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

```
php artisan export:postman --bearer=123456789
```

- [Example routes](/examples/api.php)
- [Example default output](/examples/2021_02_04_151948_postman.json)
- [Example structured output](/examples/2021_02_04_155327_postman.json)

Contributing
------------

[](#contributing)

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.

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance87

Actively maintained with recent releases

Popularity61

Solid adoption and visibility

Community34

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~44 days

Recently: every ~169 days

Total

44

Last Release

62d ago

Major Versions

v1.16.0 → v2.0.02024-03-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/cbcfffbafce2c4d0788950c08b11f244cbc878bdf5e9e9f5d340b1703eae4dcf?d=identicon)[AndreasElia](/maintainers/AndreasElia)

---

Top Contributors

[![andreaselia](https://avatars.githubusercontent.com/u/5033092?v=4)](https://github.com/andreaselia "andreaselia (142 commits)")[![tomirons](https://avatars.githubusercontent.com/u/5089787?v=4)](https://github.com/tomirons "tomirons (103 commits)")[![Menkveld-24](https://avatars.githubusercontent.com/u/43108191?v=4)](https://github.com/Menkveld-24 "Menkveld-24 (14 commits)")[![almightynassar](https://avatars.githubusercontent.com/u/1694062?v=4)](https://github.com/almightynassar "almightynassar (9 commits)")[![johnnybenson](https://avatars.githubusercontent.com/u/238022?v=4)](https://github.com/johnnybenson "johnnybenson (7 commits)")[![Martincic](https://avatars.githubusercontent.com/u/66355160?v=4)](https://github.com/Martincic "Martincic (5 commits)")[![robertmarney](https://avatars.githubusercontent.com/u/48888686?v=4)](https://github.com/robertmarney "robertmarney (5 commits)")[![ajanes93](https://avatars.githubusercontent.com/u/13524162?v=4)](https://github.com/ajanes93 "ajanes93 (3 commits)")[![jmgoncalves97](https://avatars.githubusercontent.com/u/63178864?v=4)](https://github.com/jmgoncalves97 "jmgoncalves97 (2 commits)")[![tuandp](https://avatars.githubusercontent.com/u/19854298?v=4)](https://github.com/tuandp "tuandp (1 commits)")[![andrew-downey](https://avatars.githubusercontent.com/u/2196715?v=4)](https://github.com/andrew-downey "andrew-downey (1 commits)")[![igorleszczynski](https://avatars.githubusercontent.com/u/29225705?v=4)](https://github.com/igorleszczynski "igorleszczynski (1 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (1 commits)")[![oooiik](https://avatars.githubusercontent.com/u/77920516?v=4)](https://github.com/oooiik "oooiik (1 commits)")[![sebj54](https://avatars.githubusercontent.com/u/5880435?v=4)](https://github.com/sebj54 "sebj54 (1 commits)")[![TryV](https://avatars.githubusercontent.com/u/35303148?v=4)](https://github.com/TryV "TryV (1 commits)")[![AbdullahObaid](https://avatars.githubusercontent.com/u/1207636?v=4)](https://github.com/AbdullahObaid "AbdullahObaid (1 commits)")

---

Tags

apicollectiongeneratorinsomnialaravel-packagepostmanrouteapilaravelcollectiongeneratePostman

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/andreaselia-laravel-api-to-postman/health.svg)

```
[![Health](https://phpackages.com/badges/andreaselia-laravel-api-to-postman/health.svg)](https://phpackages.com/packages/andreaselia-laravel-api-to-postman)
```

###  Alternatives

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[laravel/surveyor

Static analysis tool for Laravel applications.

7639.0k7](/packages/laravel-surveyor)[laravel/ranger

Laravel Ranger is a powerful introspection library for Laravel applications.

5138.9k4](/packages/laravel-ranger)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
