<?php

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

Guard::requireLogin();

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

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