PHP code example of thunken / doc-doc-goose

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

    

thunken / doc-doc-goose example snippets


Thunken\DocDocGoose\DocDocGooseProvider::class,

return [
    'routes' => [
        'v1' => [
            'patterns' => [ 'api.v1.*' ],
            'rules' => [
                'headers' => [
                    'Authorization' => '<Your API Key>'
                ]
            ]
        ]
    ],
    'cache' => [
        'enabled' => true,
        'store' => 'file'
    ]
];

'Extractor' => Thunken\DocDocGoose\Facades\Extractor::class,

{!! \Extractor::renderMenu()  !!}

{!! \Extractor::renderContent()  !!}

$extractor = app(Extractor::class);
$extractor->extract();

/** @var array $docsAsArray */
$docAsArray = $extractor->toArray(); // returns an array

/** @var Collection $docsAsGroups */
$docsAsGroups = $extractor->toRaw(); // returns a Group Collection

bash
php artisan vendor:publish --provider="Thunken\DocDocGoose\DocDocGooseProvider"