PHP code example of final-gene / rest-api-entry-point-module

1. Go to this page and download the library: Download final-gene/rest-api-entry-point-module 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/ */

    

final-gene / rest-api-entry-point-module example snippets


return [
    'router' => [
        'routes' => [
            'api' => [
                'type' => 'literal',
                'options' => [
                    'route' => '/api',
                'child_routes' => [
                    'rest' => [
                        'type' => 'literal',
                        'options' => [
                            'route' => '/rest',
                            'defaults' => [
                                'controller' => 'FinalGene\RestApiEntryPointModule\EntryPointController',
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],
];