PHP code example of hopheartsceo / laravel-postman-exporter
1. Go to this page and download the library: Download hopheartsceo/laravel-postman-exporter library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hopheartsceo / laravel-postman-exporter example snippets
use Hopheartsceo\PostmanExporter\Facades\PostmanExporter;
// Generate Postman Collection (default)
$collection = PostmanExporter::generate();
// Generate OpenAPI spec
$openapi = PostmanExporter::generate('openapi');
// Generate and save to file
$path = PostmanExporter::save('/path/to/collection.json');
// Generate and upload to Postman
$result = PostmanExporter::upload('your-api-key');