PHP code example of glavweb / silex-standard
1. Go to this page and download the library: Download glavweb/silex-standard 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/ */
glavweb / silex-standard example snippets
shell
/**
* Person show page
*/
$controllers->get('/person', function (Application $app) {
return $app['twig']->render('pages/person.html.twig', [
'name' => 'John Doe',
'phone' => '+7 123 123 1234'
]);
})->bind('person_show');
bash
php bin/console generate:static-pages