File: /var/www/vhosts/creativefellows.nl/nec.creativefellows.nl/BU 17072025/config/routes.php
<?php
use App\Action\Preflight\PreflightAction;
use App\Action\Home\HomeAction;
use App\Action\View\ViewAction;
use App\Action\Download\DownloadAction;
use App\Action\Download\DownloadRedirectAction;
use App\Action\News\NewsListAction;
use App\Action\News\NewsViewAction;
use App\Action\Partner\PartnerLocatorAction;
use App\Action\Partner\PartnerCountryAction;
use App\Action\Form\FormPostAction;
use App\Action\Search\SearchAction;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Slim\App;
use Slim\Routing\RouteCollectorProxy;
return function (App $app) {
// preflight headers
$app->options('/{routes:.*}', PreflightAction::class);
// home
$app->get('/', HomeAction::class)->setName('home');
// download files
$app->get('/search', SearchAction::class)->setName('search.view');
// download files
$app->get('/documents', DownloadRedirectAction::class)->setName('document.view');
$app->get('/documents/[{page}]', DownloadAction::class)->setName('document.view');
// view pages
$app->get('/newsroom', NewsListAction::class)->setName('newsroom.list');
$app->get('/newsroom/{category}', NewsListAction::class)->setName('newsroom.category');
$app->get('/newsroom/{category}/{page}', NewsViewAction::class)->setName('newsroom.view');
// partner locator
$app->get('/partners/find-a-partner', PartnerLocatorAction::class)->setName('partner.locator');
$app->post('/partners/country/{country}', PartnerCountryAction::class)->setName('partner.country');
// pages
$app->get('/{page}', ViewAction::class)->setName('section.view');
$app->get('/{section}/{page}', ViewAction::class)->setName('page.view');
// forms
$app->post('/submissions/submit/{id}/{name}', FormPostAction::class)->setName('form.post');
//$app->get('/contact-us/form-succesfully-sent', ViewAction::class)->setName('form.submitted');
};