PHP code example of rootlogin / jsrouting-provider
1. Go to this page and download the library: Download rootlogin/jsrouting-provider 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/ */
rootlogin / jsrouting-provider example snippets
{.php}
$app->register(new rootLogin\JSRoutingProvider\Provider\SilexJSRoutingServiceProvider(), array(
"jsrouting.base_url" => "/",
"jsrouting.exposed_routes" => array("routeA", "routeB")
));
{.php}
$controllers->get("/hello", function() {
return "hello world"!
})->bind("hello")->getRoute()->setOption("expose",true);