<?php

use MintyPHP\Support\Guard;
use MintyPHP\Router;
use MintyPHP\Http\Request;

Guard::requireLogin();

$slug = trim((string) ($slug ?? ''));
if ($slug === '') {
    require __DIR__ . '/index().php';
    return;
}

Router::redirect('error/not_found?url=' . urlencode(Request::pathWithQuery()));
