<?php
function buildRoutes(&$app) {
    $folder = implode(DIRECTORY_SEPARATOR, [
        $app->getContainer()->get('folders')->get('routes'),
        'ui'
    ]);
    $files = new FilesystemIterator($folder);
    foreach ($files as $file) {
        if ($file->isDir()) {
            continue;
        }
        include_once $file->getRealPath();
    }
}
buildRoutes($app);
