PHP code example of pahanini / yii2-rest-doc

1. Go to this page and download the library: Download pahanini/yii2-rest-doc 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/ */

    

pahanini / yii2-rest-doc example snippets



/**
 * My model.
 *
 * @property string $title Model's title
 */


/**
 * @restdoc-field int $id ID
 * @restdoc-field string $title Model's title
 */


/**
 * @restdoc-ignore $hidden
 */
 php
'controllerMap' => [
	'build-rest-doc' => [
		'sourceDirs' => [
			'@frontend\controllers\rest',
		],
		'template' => '//restdoc/restdoc.twig',
		'class' => '\pahanini\restdoc\controllers\BuildController',
		'targetFile' => 'path/to/slate/index.md',
		'on afterAction' => function() { exec("bundle exec middleman build") }
	],
]