PHP code example of iwai / phalcon-router-adapter-config

1. Go to this page and download the library: Download iwai/phalcon-router-adapter-config 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/ */

    

iwai / phalcon-router-adapter-config example snippets



$di['router'] = function() {
    // Use the config router
    $router = new \Phalcon\Mvc\Router\Config();
    $router->build(
        new Phalcon\Config\Adapter\Yaml('path/route.yml')
    );
    return $router;
};