1. Go to this page and download the library: Download romagny13/flash 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/ */
class TwigRenderer
{
public $twig;
public function __construct($templateDirectory)
{
$loader = new Twig_Loader_Filesystem($templateDirectory);
$this->twig = new Twig_Environment($loader);
}
public function render($viewPath, $params=[]){
echo $this->twig->render($viewPath,$params);
}
}
$renderer = new TwigRenderer(__DIR__.'/templates');
$renderer->twig->addGlobal('flash', $flash);
$renderer->render('home.twig');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.