27 lines
521 B
PHP
27 lines
521 B
PHP
<?php
|
|
|
|
namespace Slovocast;
|
|
|
|
use Slim\App;
|
|
use Slovocast\Controller\HomePage;
|
|
use Slovocast\Controller\User\{
|
|
RegisterUserPage,
|
|
RegisterUserAction
|
|
};
|
|
|
|
class Routes
|
|
{
|
|
public static function init(App $app): void
|
|
{
|
|
$app->get('/', HomePage::class);
|
|
// User Routes
|
|
self::users($app);
|
|
}
|
|
|
|
protected static function users(App $app): void
|
|
{
|
|
$app->get('/users/register', RegisterUserPage::class);
|
|
$app->post('/users/register', RegisterUserAction::class);
|
|
}
|
|
}
|