<?php

if (!function_exists('redirect')) {
    function redirect(string $path): void
    {
        if (!headers_sent()) {
            header('Location: ' . base_path($path));
        }
        exit;
    }
}
