Tereta/Route Module
Overview
Routing module. Manages sites, domains, and routes. Supports multi-site architecture — a single project can serve multiple sites on different domains.
Multi-Site Support
The project supports multiple sites, each with its own domains:
- Site — a logical unit with a name and identifier
- Domain — host binding to a site (supports port, path, HTTP/HTTPS)
example.com and admin.example.com/panel).
Routing
Routes are resolved through a priority chain:
- Controller attributes — routes declared via
#[ControllerAttribute](see Application module) - Database — routes from the
routetable
CLI Commands
Site management:
./cli.php route:site list # List sites
./cli.php route:site create <identifier> "<name>" "<url>" # Create a site
./cli.php route:site delete <identifier> # Delete a site
Example:
./cli.php route:site create default "My Site" "https://example.com"
Author and License
Author: Tereta Alexander
Website: tereta.dev
License: Apache License 2.0. See LICENSE.
www.████████╗███████╗██████╗ ███████╗████████╗ █████╗
╚══██╔══╝██╔════╝██╔══██╗██╔════╝╚══██╔══╝██╔══██╗
██║ █████╗ ██████╔╝█████╗ ██║ ███████║
██║ ██╔══╝ ██╔══██╗██╔══╝ ██║ ██╔══██║
██║ ███████╗██║ ██║███████╗ ██║ ██║ ██║
╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝
.dev
Copyright (c) 2024-2026 Tereta Alexander