1. Go to this page and download the library: Download yaro/apidocs 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/ */
/**
* Some api endpoint for important stuff.
*
* Just show some template with
* some very long description
* on several lines
*
* @param int $offset Just an offset size
* @param string $password
*/
public function getSomeStuff()
{
return response()->json([]);
}
'exclude' => [
'classes' => [
// 'App\Http\Controllers\*' - exclude all controllers from docs.
// 'App\Http\Controllers\MyController@*' - remove all methods for specific controller from docs.
],
'routes' => [
// 'payment/test',
// 'simulate/*',
],
],
ApiDocs::blueprint()->create();
// or pass snapshot name and/or filesystem disc name
ApiDocs::blueprint()->create('my-newest-snapshot', 's3-blueprint');