2024-05-16 01:42:24 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Slovocast;
|
|
|
|
|
|
|
|
use Slim\App;
|
2024-05-16 02:15:24 +00:00
|
|
|
use Slovocast\Controller\HomePage;
|
2024-05-16 01:42:24 +00:00
|
|
|
use Slovocast\Controller\User\{
|
|
|
|
RegisterUserPage,
|
|
|
|
RegisterUserAction
|
|
|
|
};
|
|
|
|
|
|
|
|
class Routes
|
|
|
|
{
|
|
|
|
public static function init(App $app): void
|
|
|
|
{
|
2024-05-16 02:15:24 +00:00
|
|
|
$app->get('/', HomePage::class);
|
2024-05-16 01:42:24 +00:00
|
|
|
// User Routes
|
|
|
|
self::users($app);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected static function users(App $app): void
|
|
|
|
{
|
|
|
|
$app->get('/users/register', RegisterUserPage::class);
|
|
|
|
$app->post('/users/register', RegisterUserAction::class);
|
|
|
|
}
|
|
|
|
}
|