PHP code example of hyvor / laradocs

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

    

hyvor / laradocs example snippets




/**
    * you can have multiple documents as seperate arrays inside return array.
**/

return 
[
    [
        /**
         * @tional
         * You can define path to your own theme here, laradocs default theme will display if null provided
         */
        'view' => null,
         /**
         * @and page links. each page link should have id,lable properties and file property is optional
         * Id represents link path, label defines title of page while option file field for define custom location for content file of relevant page.
         * All properties should be string
         * You can define multiples sections and multiple pages as you want
         */
        'navigation' => [
            'First Section' => [
                [
                    'id' => '', //page link url
                    'file' => 'index', // optional, you can define alternative file path here
                    'label' => 'Introduction' // page label
                ],
                [
                    'id' => 'description',
                    'label' => 'What is laradocs'
                ],
            ],
            'Second Section' => [
                [
                    'id' => 'about',
                    'label' => 'About us'
                ]
            ]
        ]
    ]
];
bash
php artisan vendor:publish --provider="Hyvor\Laradocs\LaradocsServiceProvider" --tag="assets"
bash
php artisan vendor:publish --provider="Hyvor\Laradocs\LaradocsServiceProvider" --tag="config"
bash
php artisan vendor:publish --provider="Hyvor\Laradocs\LaradocsServiceProvider" --tag="views"