Download the PHP package matijajanc/postman without Composer
On this page you can find all versions of the php package matijajanc/postman. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download matijajanc/postman
More information about matijajanc/postman
Files in matijajanc/postman
Informations about the package postman
Postman collection generator
Installation
Laravel
Publish config file
Lumen
add below line to bootstrap/app.php
Publish config file
Run command to generate Postman files
This command generates 2 files:
- postman-environment.json (where variables are defined)
- postman.json (where all API routes are defined)
Currently it supports bearer token authorization, if you have other wishes please create new issue or pull request on github and I'll add/extend it.
Requirements
- Laravel 8 or Lumen 8 (it works with older version of Laravel/Lumen also, but you need to provide "method" property in Postman attribute definition)
- PHP ^8.0
- If you want to use JWT bearer token then you need to configure it first https://jwt-auth.readthedocs.io/en/develop/laravel-installation/
PHP 8 attributes
I used new PHP 8 attributes feature to define new properties I use for postman file generator. This is not needed to define for GET, DELETE routes, you provide this Postman attribute only where you want your custom request payload POST, PUT.
Usages
If no method is provided it calls default factory "definition" method
You can override which methods get called with additional "method" property
You can override body type with property "mode"
All versions of postman with dependencies
ext-json Version *