PHP code example of kolserdav / router

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

    

kolserdav / router example snippets




use Avir\Router\Route;

$router = new Route();
$router->route();

class SomeClass
{
    public $id
    
    public function someFunction(){
        $this->id;
    }
} 

class SomeClass
{
    public $params;
    
    public function someFunction(){
        $this->params; //[ one : param1, two : param2, three : param3 ]
    }
}