PHP code example of saberyjs / tp5-route-helper
1. Go to this page and download the library: Download saberyjs/tp5-route-helper 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/ */
saberyjs / tp5-route-helper example snippets
$routeHelper = new \saberyjs\tp_route_helper\RouterHelper();
$routeHelper->register([
['index',APP_PATH]
]);
/**
* @auto true
* @https false
* **/
class Index
{
/**
* @rule /home/:id/:token
* @alias home
* @https false
* @method get|post
* @ext html|shtml
* @deny_ext htm
* @constraint id \d{1,5} token \w+
* **/
public function index($id)
{
echo Route::class;
}
}