Laravel Routes to Postman Collection Generator: Generate routes for an API or Web applications

Recommend this page to a friend!
  Info   Documentation   View files (6)   Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-06-18 (1 month ago) Not yet rated by the usersTotal: 37 This week: 1All time: 9,911 This week: 255
Version License PHP version Categories
postman-collection-g 1.0.0GNU General Publi...7Utilities and Tools, Libraries, Desig..., P...
Description Author

This package can generate postman collection from Laravel routes for an API or Web applications.

It can take a Router object and traverses it to extract the routes for a Web or API application.

The package can generate a JSON file with the route definition that can be used in an application that uses the PostMan application to implement an API.

Innovation Award
PHP Programming Innovation award nominee
June 2020
Number 2
Some APIs are implemented in PHP using the Laravel framework. Usually they use Router objects to execute the code that is meant to implement each API call.

It can use the Router objects provided to implement a Web application or an API using Laravel to extract JSON configuration for using with the Postman application.

Manuel Lemos
Picture of Clement Sam
  Performance   Level  
Name: Clement Sam is available for providing paid consulting. Contact Clement Sam .
Classes: 4 packages by
Country: Ghana Ghana
Age: 21
All time rank: 30953 in Ghana Ghana
Week rank: 243 1 in Ghana Ghana
Innovation award
Innovation award
Nominee: 1x

Details

Laravel Routes to Postman Collection Generator

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

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
  Files  
File Role Description
src (2 files)
composer.json Data Auxiliary data
LICENSE Lic. License text
README.md Doc. Documentation
_config.yml Data Auxiliary data

  Files  /  src  
File Role Description
   ExportPostmanCollection.php Class Class source
   PostmanCollectionServiceProvider.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:37
This week:1
All time:9,911
This week:255

For more information send a message to info at phpclasses dot org.