PHP code example of zhan3333 / api-tester

1. Go to this page and download the library: Download zhan3333/api-tester 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/ */

    

zhan3333 / api-tester example snippets



    'extensions' => [
    
        'api-tester' => [
        
            // route prefix for APIs
            'prefix' => 'api',

            // If you are not using the default user model as the authentication model, set it up
            'user_retriever' => function ($id) {
                return \App\User::find($id);
            },
        ]
    ]


 * @Parameters({
 *      @Parameter("contract_file_id", description="文件id")
 * })

$ composer isan vendor:publish --tag=api-tester