2017 © Pedro Peláez
 

library laravel-postman

Export laravel API routes to postman

image

nolikzero/laravel-postman

Export laravel API routes to postman

  • Friday, February 23, 2018
  • by Nolikzero
  • Repository
  • 1 Watchers
  • 0 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 6 % Grown

The README.md

laravel-postman

This package allows you to export your API routes to a postman import json file, (*1)

Installation

Install the package via composer, (*2)

composer require --dev jimenezmaximiliano/laravel-postman, (*3)

Then add the service provider in config/app.php:, (*4)

PHP >= 5.5

JimenezMaximiliano\LaravelPostman\LaravelPostmanServiceProvider::class, (*5)

PHP < 5.5

JimenezMaximiliano\LaravelPostman\LaravelPostmanServiceProvider, (*6)

Configuration

First, publish the package configuration file:, (*7)

php artisan vendor:publish, (*8)

Note: publishing the configuration file is optional, you can use de default package options., (*9)

Options

apiURL

This is the base URL for your postman routes, (*10)

default value: config('app.url'), (*11)

collectionName

This is the postman collection name, (*12)

default value: the command will ask for it, (*13)

collectionDescription

This is the postman collection description, (*14)

default value: the command will ask for it, (*15)

apiPrefix

This is the prefix by which we identify the routes to export, (*16)

default value: 'api', (*17)

skipHEAD

This avoids creating routes for HEAD method, (*18)

default value: true, (*19)

exportDirectory

The directory to which the postman.json file will be exported, (*20)

Usage

Configuring controllers

Add a property to your entity controller like this:, (*21)

public $postmanModel = 'App\MyEntityModel';, (*22)

Add a public method to your model class like this:

public function getPostmanParams() { return $this->fillable; }, (*23)

This array of params will be used to fill POST and PUT urlencoded form data section in postman. The previous method is just an example, you should return the array of params that you want to see in postman., (*24)

Export

php artisan laravelPostman:export, (*25)

The Versions

23/02 2018

dev-master

9999999-dev https://github.com/nolikzero/laravel-postman

Export laravel API routes to postman

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nurlan Ibraev

laravel api export github postman nolikzero

23/02 2018

dev-stable

dev-stable https://github.com/nolikzero/laravel-postman

Export laravel API routes to postman

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nurlan Ibraev

laravel api export github postman nolikzero

15/12 2016

v1.1.2

1.1.2.0 https://github.com/jimenezmaximiliano/laravel-postman

Export laravel API routes to postman

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api export github postman jimenezmaximiliano

13/12 2016

v1.1.1

1.1.1.0 https://github.com/jimenezmaximiliano/laravel-postman

Export laravel API routes to postman

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api export github postman jimenezmaximiliano

24/11 2016

v1.1.0

1.1.0.0 https://github.com/jimenezmaximiliano/laravel-postman

Export laravel API routes to postman

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api export github postman jimenezmaximiliano

22/11 2016

v1.0.2

1.0.2.0 https://github.com/jimenezmaximiliano/laravel-postman

Export laravel API routes to postman

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api export github postman jimenezmaximiliano

22/11 2016

v1.0.1

1.0.1.0 https://github.com/jimenezmaximiliano/laravel-postman

Export laravel API routes to postman

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api export github postman jimenezmaximiliano

22/11 2016

v1.0.0

1.0.0.0 https://github.com/jimenezmaximiliano/laravel-postman

Export laravel API routes to postman

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api export github postman jimenezmaximiliano