PHPackages                             laravelgenerators/postman-generator - 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. laravelgenerators/postman-generator

ActiveLibrary[API Development](/categories/api)

laravelgenerators/postman-generator
===================================

Automatically generates a Postman Collection JSON from a Laravel API project.

v2.0.1(4mo ago)133MITPHPPHP ^8.2CI passing

Since Feb 20Pushed 2mo agoCompare

[ Source](https://github.com/speedo2003r/postman-generator)[ Packagist](https://packagist.org/packages/laravelgenerators/postman-generator)[ RSS](/packages/laravelgenerators-postman-generator/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (5)Versions (4)Used By (0)

Laravel Postman Collection Generator
====================================

[](#laravel-postman-collection-generator)

A smart Postman collection generator for Laravel 11.x and 12.x that automatically scans routes, extracts metadata from attributes/docblocks, and generates realistic request body examples from FormRequests.

Features
--------

[](#features)

- **Automated Scanning**: Automatically finds all API routes.
- **Metadata Extraction**: Derives request names, descriptions, and folders from `#[PostmanMeta]` attributes or DocBlocks.
- **Body Example Generation**: Parses FormRequest validation rules (including nested and wildcard rules) to create non-empty JSON/form-data bodies.
- **Response Capture**: Optionally hits your local endpoints to capture live response examples.
- **Smart Grouping**: Groups requests into folders based on URI segments or Controller names.
- **Auth Detection**: Automatically detects Bearer authentication from middlewares.

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

[](#installation)

```
composer require laravelgenerators/postman-generator:main-dev
```

The package uses Laravel's auto-discovery, so it's ready to use immediately.

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

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=postman-generator-config
```

### Key Options

[](#key-options)

In `config/postman-generator.php`:

- `collection_name`: The name of your imported collection.
- `base_url`: Defaults to your `APP_URL`, used as `{{base_url}}` variable.
- `auto_examples`: Set to `true` (default) to generate bodies from FormRequests.
- `generate_responses`: Set to `true` to capture live responses (local-only for safety).

### Local Response Capture

[](#local-response-capture)

If `generate_responses` is enabled, define a token in your `.env` for authenticated requests:

```
POSTMAN_GENERATOR_TOKEN=your-local-dev-bearer-token
```

Usage
-----

[](#usage)

Generate the collection JSON:

```
php artisan postman:generate
```

Override output path:

```
php artisan postman:generate --output=path/to/my-collection.json
```

Annotating Routes
-----------------

[](#annotating-routes)

Use the `#[PostmanMeta]` attribute for precise control. You can also override the request body for routes that don't use FormRequests (e.g., when using `$request->validate()` directly):

```
use LaravelGenerators\PostmanGenerator\Attributes\PostmanMeta;

class OrderController extends Controller
{
    #[PostmanMeta(
        name: 'List All Orders',
        folder: 'Order Management',
        description: 'Returns a paginated list of orders',
        body: ['email' => 'user@example.com', 'password' => 'secret']
    )]
    public function index() { ... }
}
```

Or use DocBlock tags (body must be valid JSON):

```
/**
 * @postman-name List All Orders
 * @postman-folder Order Management
 * @postman-body {"email": "user@example.com", "password": "secret"}
 */
public function index() { ... }
```

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance82

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~0 days

Total

3

Last Release

133d ago

Major Versions

v1.0.1 → v2.0.02026-02-20

### Community

Maintainers

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

---

Top Contributors

[![speedo2003r](https://avatars.githubusercontent.com/u/25309908?v=4)](https://github.com/speedo2003r "speedo2003r (9 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/laravelgenerators-postman-generator/health.svg)

```
[![Health](https://phpackages.com/badges/laravelgenerators-postman-generator/health.svg)](https://phpackages.com/packages/laravelgenerators-postman-generator)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[nuwave/lighthouse

A framework for serving GraphQL from Laravel

3.5k11.8M117](/packages/nuwave-lighthouse)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)

PHPackages © 2026

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