Home

Awesome

Build Status Latest Stable Version Total Downloads Latest Unstable Version License contributions welcome FOSSA Status

About

This package automatically generates postman collection from laravel api/web routes with just a single command

Postman Schema

Supports postman collection Schema v2.1.0

Installation

Install this bundle through Composer:

composer require profclems/postman-collection-generator

Supports Auto-discovery for Laravel 5.5+

For older versions add the PostmanCollectionServiceProvider to providers in the config/app.php

'providers' => [
    ...
    \Profclems\PostmanCollectionGenerator\PostmanCollectionServiceProvider::class,
];

Usage

To generate collection for api routes, run

php artisan postman:collection:export NameForCollection --api

This will generate a yyyy_mm_dd_his_NameForCollection_api.json in your Laravel storage/app folder.

To generate collection for web routes, run

php artisan postman:collection:export NameForCollection --web

This will generate a yyyy_mm_dd_his_NameForCollection_web.json in your Laravel storage/app folder.

Change NameForCollection to the name you want the collection file saved as.

Options

By default, the url is set to {{base_url}} which is a postman variable that can be set in your postman environment.

--api or --web to specify the type of route to export
--url to specify the url for the collection. Eg. --url=localhost
--port to specify the port. Eg --port=8000

ToDo

Contributing

Thank you for considering contributing to the this package! Feel free to submit a PR

Awards / Nominations

PHP Classes Innovative Award Nominee

License

FOSSA Status