Download the PHP package bhaveshsoni26/laravel-postman-sync without Composer

On this page you can find all versions of the php package bhaveshsoni26/laravel-postman-sync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-postman-sync

Laravel Postman Sync

Turn your Laravel API routes into a complete, importable Postman Collection โ€” docs, examples, tests, environments, and one-command push โ€” with zero manual annotations.

Tests PHPStan Code style License

๐Ÿ“– Documentation  ยท  Packagist  ยท  Issues

That's it. The package scans every API route, reads your controllers and FormRequest classes, and writes a Postman Collection v2.1 (with embedded docs and test scripts), per-stage environment files, and an OpenAPI document โ€” then, with --push, syncs it straight to your Postman workspace.

๐Ÿ“– Full documentation, guides and examples: postman-sync.bhaveshdev.in


Why

Keeping a Postman collection in step with a growing API is tedious and always out of date. This package makes the collection a build artifact: re-run one command and your routes, request bodies, auth, examples, docs, and tests regenerate deterministically. Add 10 new endpoints and --push appends just those โ€” without clobbering the manual edits your team made in Postman.

Features

Requirements

PHP 8.2+
Laravel 10, 11, or 12

Installation

The service provider auto-registers via package discovery. Publish the config:

Not on Packagist yet? Install from a local path repository โ€” see INSTALLATION.md for the one-time repositories setup.

Quick start

Import storage/app/postman/collection.json and an environment file into Postman, fill in the token variables, and send.

What it generates

Command reference

Command Result
postman:sync collection + environments + openapi (default)
postman:sync --only=collection only collection.json
postman:sync --only=environment only the environment file(s)
postman:sync --only=openapi only openapi.json
postman:sync --docs-files also write standalone Markdown to <output>/docs/
postman:sync --output=build/postman custom output directory
postman:sync --push generate, then merge into the Postman collection
postman:sync --push --fresh full replace of the remote collection

Push to Postman

Incremental merge appends new routes, regenerates changed ones, and leaves unchanged requests โ€” including manual edits to their docs/tests โ€” untouched. Use --fresh to overwrite the whole collection.

Getting your Postman credentials

You only need the API key to push. The collection ID and workspace ID are optional (see notes below).

1. API key โ€” POSTMAN_API_KEY (required)

  1. Sign in to Postman and open go.postman.co/settings/me/api-keys (or: click your avatar, top-right โ†’ Settings โ†’ API keys).
  2. Click Generate API Key, give it a name (e.g. laravel-postman-sync), and Generate.
  3. Copy the key โ€” it starts with PMAK- โ€” and put it in .env:

    Treat it like a password. You can only see it once; regenerate if you lose it.

2. Collection ID โ€” POSTMAN_COLLECTION_ID (optional)

Leave this empty the first time โ€” --push creates a new collection and prints its ID:

Copy that ID into .env so future pushes update the same collection instead of creating duplicates:

To target a collection that already exists, fetch its exact API uid (not the short id shown in the app) โ€” list them with your key:

Use the uid value from the response (looks like 12345678-...).

3. Workspace ID โ€” POSTMAN_WORKSPACE_ID (optional)

Only used when creating a new collection, to place it in a specific workspace. Omit it to use your default workspace.

After editing .env, run php artisan config:clear so Laravel picks up the new values, then php artisan postman:sync --push.

Configuration

Key options in config/postman-sync.php:

Full configuration reference and a multi-guard (CRM-style) example are in INSTALLATION.md.

How it works

A one-directional pipeline of immutable DTOs; each stage is interface-backed and independently tested.

Testing

All Postman API calls go through Laravel's Http facade and are mocked with Http::fake() โ€” the test suite needs no real API key or network.

Contributing

Issues and PRs welcome. Please run composer test && composer stan && composer lint before submitting. New code uses declare(strict_types=1) and Sorbet-style full type hints; tests are written in Pest.

License

MIT.


All versions of laravel-postman-sync with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/routing Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/validation Version ^10.0|^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bhaveshsoni26/laravel-postman-sync contains the following files

Loading the files please wait ...