Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

laravel-api-to-postman

> 后端框架
Open source

Generate a Postman collection automatically from your Laravel API

1.1K stars0 likes1 views
WebsiteGitHub

About

Generate a Postman collection automatically from your Laravel API

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

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

Installation

Install the package:

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

Publish the config file:

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

Configuration

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

Click here to view the config attributes.

Usage

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

To use the command simply run:

bash
php artisan export:postman

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

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

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

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

If both auths are specified, bearer will be favored.

Examples

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

bash
php artisan export:postman --bearer=123456789
  • Example routes
  • Example default output
  • Example structured output

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.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPapicollectiongeneratorinsomnia

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架