PHP code example of bhaveshsoni26 / laravel-postman-sync

1. Go to this page and download the library: Download bhaveshsoni26/laravel-postman-sync 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/ */

    

bhaveshsoni26 / laravel-postman-sync example snippets


'api_prefix'      => 'api',                 // routes to scan
'output_path'     => storage_path('app/postman'),
'base_url'        => env('APP_URL').'/api', // seeds {{base_url}}
'default_guard'   => 'sanctum',             // collection-level auth
'guard_tokens'    => [],                    // guard => token var override
'environments'    => ['local', 'staging', 'production'],
'generate_tests'  => true,
'capture_login_token' => true,
'postman' => [
    'api_key'       => env('POSTMAN_API_KEY'),
    'collection_id' => env('POSTMAN_COLLECTION_ID'),
    'sync_mode'     => 'merge',             // merge | replace
    'prune_orphans' => false,
],
bash
php artisan postman:sync
bash
php artisan vendor:publish --tag=postman-sync-config