PHP code example of luisj / postman-collection-viewer

1. Go to this page and download the library: Download luisj/postman-collection-viewer 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/ */

    

luisj / postman-collection-viewer example snippets


use \Luisj\PostmanCollectionViewer\Facades\PostmanCollectionViewer;

$path_collection = base_path() . "/resources/postman/postman_collection.json";

return PostmanCollectionViewer::loadCollection($path_collection)->renderView();

$path_collection = base_path() . "/resources/postman/postman_collection.json";
$path_enviroment = base_path() . "/resources/postman/postman_environment.json";

return PostmanCollectionViewer::loadCollection($path_collection)
       ->loadEnviroment($path_enviroment)
       ->renderView();
bash
php artisan vendor:publish --provider="Luisj\PostmanCollectionViewer\PostmanCollectionViewerServiceProvider" --tag=public