1. Go to this page and download the library: Download aatis/routing 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/ */
aatis / routing example snippets
class AatisController extends AbstractController
{
// ...
}
class AatisController extends AbstractController
{
public function hello(): void
{
$this->render('template/path', [
'template_var1' => 'Hello',
'template_var2' => 'World !'
]);
}
}
class AatisHomeController extends AbstractHomeController
{
public function home(): void
{
// ...
}
}
#[Route('/hello')]
public function hello(): void
{
// ...
}
#[Route('/hello/{name}/{age}')]
public function hello(string $name, int $age): void
{
// ...
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.