PHP code example of liamato / ligght

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

    

liamato / ligght example snippets


\ligght\Router::getInstance()->route(
    \ligght\Router::GET, 
    '/hello/:name',
    function($name){
        print "Hello, $name";
    },
    array(':name')
);

\ligght\Router::getInstance()->run();