get('/', HomePage::class); $app->get('/healthcheck', HealthCheck::class); // User Routes self::users($app); } /** * @param App $app Instantiated Application * @return void */ protected static function users(App $app): void { $app->get('/users/register', RegisterUserPage::class) ->setName('user-register-page'); $app->post('/users/register', RegisterUserAction::class) ->add(VerifyPasswordMiddleware::class) ->setName('user-register-action'); $app->get('/login', LoginUserPage::class) ->setName('user-login-page'); $app->post('/login', LoginUserAction::class) ->add(AuthenticatedMiddleware::class) ->setName('user-login-action'); $app->get('/dashboard', DashboardPage::class) ->add(AuthenticatedMiddleware::class) ->setName('user-dashboard'); } }