Verano Regional reads all sensitive settings — database credentials, SMTP details, and debug flags — from aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/AngelZurita28/VeranoRegional/llms.txt
Use this file to discover all available pages before exploring further.
.env file in the project root. The EnvLoader helper parses this file at startup and exposes each key through PHP’s $_ENV and $_SERVER superglobals, as well as getenv(). No framework-level configuration layer is involved.
.env file
Create a.env file in the project root before starting the server. A minimal working configuration looks like this:
Variable reference
| Variable | Required | Description |
|---|---|---|
DB_HOST | Yes | MySQL hostname |
DB_NAME | Yes | Database name (default: verano) |
DB_USER | Yes | MySQL username |
DB_PASS | Yes | MySQL password |
SMTP_HOST | Yes (email) | SMTP server hostname |
SMTP_USER | Yes (email) | SMTP login username |
SMTP_PASS | Yes (email) | SMTP login password |
SMTP_PORT | No | SMTP port — 587 (STARTTLS) or 465 (SSL). Defaults to 587 |
SMTP_FROM_EMAIL | No | Sender address. Defaults to SMTP_USER |
SMTP_FROM_NAME | No | Sender display name |
EnvLoader
helpers/EnvLoader.php provides a single static method that reads the .env file line by line, skips blank lines and comments, and injects each key-value pair into the PHP environment — but only if the variable is not already set by the OS or web server, preventing accidental overrides.
index.php calls this once before any controller is loaded:
Database connection
config/conn.php defines the Database class. The connection credentials are currently hard-coded as class properties — update them directly to match your local MySQL setup, or replace them with $_ENV reads after EnvLoader runs.
PDO::ERRMODE_EXCEPTION so database errors throw catchable PDOException instances rather than returning silent failures. The utf8mb4 charset ensures full Unicode support, including emoji and non-Latin scripts.
The
Database class also exposes higher-level helper methods — Select(), Insert(), Update(), Delete() — used by some model code. Newer models receive the raw PDO connection object from connect() and use prepared statements directly.Required PHP extensions
The database layer requires the following PHP extensions to be enabled:pdo— base PDO librarypdo_mysql— MySQL driver for PDO
php -m | grep -i pdo before running the application.
Email configuration
OTP emails during registration and password reset are sent via PHPMailer (bundled inhelpers/PHPMailer/). The EmailHelper class reads SMTP settings from $_ENV at send time:
SMTP_* variables in .env. For local development you can use a mail-catching tool such as Mailpit or Mailtrap by pointing SMTP_HOST, SMTP_USER, and SMTP_PORT at the local catcher.
Debug mode
RegisterController includes a $debugMode flag that bypasses live OTP generation and email delivery during development:
true to use the static OTP 000000 for all email-verification flows. This lets you complete the registration process without a working SMTP server.