1. Go to this page and download the library: Download veka-server/rooter 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/ */
veka-server / rooter example snippets
// Creation de l'objet
$router = new \VekaServer\Rooter\Rooter();
// Définir une page 404
$router->set404(function(){
echo 'ma page 404';
});
// creation du dispatcher
$Dispatcher = new VekaServer\Dispatcher\Dispatcher();
// creer le router
$router = new VekaServer\Rooter\Rooter();
// Définir une page 404
$router->set404(function(){
echo 'ma page 404';
});
// ajouter les route ici, par exemple
$router->get('/home', ['maClasse', 'maMethode']);
// ajout le middlewares
$Dispatcher->pipe($router);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.