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

ActiveProject[API Development](/categories/api)

matijajanc/postman
==================

Postman file generator

1.0.0(4y ago)0174MITPHPPHP ^8.0

Since Nov 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/matijajanc/postman)[ Packagist](https://packagist.org/packages/matijajanc/postman)[ RSS](/packages/matijajanc-postman/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Postman collection generator
============================

[](#postman-collection-generator)

[![](https://github.com/matijajanc/postman/raw/master/images/postman.png)](https://github.com/matijajanc/postman/blob/master/images/postman.png)

### Installation

[](#installation)

```
composer require matijajanc/postman

```

### Laravel

[](#laravel)

Publish config file

```
php artisan vendor:publish --provider="Matijajanc\Postman\Providers\PostmanServiceProvider"

```

### Lumen

[](#lumen)

add below line to bootstrap/app.php

```
$app->register(Matijajanc\Postman\Providers\PostmanLumenServiceProvider::class);

```

Publish config file

```
cp vendor/matijajanc/postman/config/postman.php config/postman.php

```

### Run command to generate Postman files

[](#run-command-to-generate-postman-files)

```
php artisan postman:generate

```

This command generates 2 files:

- postman-environment.json (where variables are defined)
- postman.json (where all API routes are defined)

Currently it supports bearer token authorization, if you have other wishes please create new issue or pull request on github and I'll add/extend it.

[![](https://github.com/matijajanc/postman/raw/master/images/postman_api.png)](https://github.com/matijajanc/postman/blob/master/images/postman_api.png)

[![](https://github.com/matijajanc/postman/raw/master/images/postman_authorization.png)](https://github.com/matijajanc/postman/blob/master/images/postman_authorization.png)

Requirements
------------

[](#requirements)

- Laravel 8 or Lumen 8 (it works with older version of Laravel/Lumen also, but you need to provide "method" property in Postman attribute definition)
- PHP ^8.0
- If you want to use JWT bearer token then you need to configure it first

### PHP 8 attributes

[](#php-8-attributes)

I used new PHP 8 attributes feature to define new properties I use for postman file generator. This is not needed to define for GET, DELETE routes, you provide this Postman attribute only where you want your custom request payload POST, PUT.

### Usages

[](#usages)

If no method is provided it calls default factory "definition" method

```
#[Postman(['factory' => ContractFactory::class])]
public function createContract(Request $request): JsonResponse

```

You can override which methods get called with additional "method" property

```
#[Postman(['factory' => ContractFactory::class, 'method' => 'postCreateContract'])]
public function createContract(Request $request): JsonResponse

```

[![](https://github.com/matijajanc/postman/raw/master/images/factory.png)](https://github.com/matijajanc/postman/blob/master/images/factory.png)

You can override body type with property "mode"

```
#[Postman(['factory' => ContractFactory::class, 'method' => 'postCreateContract', 'mode' => 'raw'])]
public function createContract(Request $request): JsonResponse

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

1656d ago

### Community

Maintainers

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

---

Tags

laravellumenPostman

### Embed Badge

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

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

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[wxm/pdd-sdk

拼多多 SDK 封装, 调用简单、语义化增强。支持 Laravel/Lumen。

154.7k](/packages/wxm-pdd-sdk)

PHPackages © 2026

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