PHP code example of camilord / laravel-postman

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

    

camilord / laravel-postman example snippets


/**
 * returns sample body for put/post request
 *
 * @param string $method - POST / PUT / PATCH etc.
 * @param string|null $routeName - the routename from the routes file if set.
 *
 * @return array
 * /
public function getPostmanParams(string $method, ?string $routeName): array
{
    return [
        'key1' => 'sampleValue',
        'key2' => ''
    ];
}

/**
  * this is the summary - which headlines the description
  *
  * this is the description - which goes on a new line under the summary (optional)
  *
  * @route-name My Custom Route Name (defaults to folder.model.method if not set)
  *
  * @param ...
  ...
  */