# ─────────────────────────────────────────────────────────────────
# Salihiya World Cargo — Environment Configuration Template
# Copy this file to .env and fill in the values for your environment.
# NEVER commit .env to git.
# ─────────────────────────────────────────────────────────────────

# ── Application ──────────────────────────────────────────────────
APP_NAME="Salihiya World Cargo"       # Change per client
APP_ENV=production                    # local | production
APP_KEY=base64:BR8xIdn3/z2ytjnb+g/Z6MeMxqb8S2oek8uERpWGUlU=                              # Run: php artisan key:generate
APP_DEBUG=false                       # MUST be false in production
APP_URL=https://yourdomain.com        # Exact URL, no trailing slash

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file

BCRYPT_ROUNDS=12

# ── Logging ───────────────────────────────────────────────────────
LOG_CHANNEL=single
LOG_LEVEL=error                       # debug | info | error (use error in production)

# ── Database (MySQL) ─────────────────────────────────────────────
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=                          # cPanel DB name (e.g. prefix_cargo)
DB_USERNAME=                          # cPanel DB user (e.g. prefix_user)
DB_PASSWORD=

# ── Session ───────────────────────────────────────────────────────
SESSION_DRIVER=database
SESSION_LIFETIME=480                  # Minutes — 8 hours for staff sessions
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null
SESSION_SECURE_COOKIE=true            # Requires HTTPS — set false for local dev
SESSION_HTTP_ONLY=true
SESSION_SAME_SITE=lax

# ── Cache ─────────────────────────────────────────────────────────
CACHE_STORE=file                      # file = faster than database on shared hosting

# ── Queue ─────────────────────────────────────────────────────────
QUEUE_CONNECTION=sync                 # sync = no worker needed on shared hosting

# ── Filesystem ────────────────────────────────────────────────────
FILESYSTEM_DISK=local
BROADCAST_CONNECTION=log

# ── Mail ──────────────────────────────────────────────────────────
MAIL_MAILER=smtp
MAIL_SCHEME=ssl
MAIL_HOST=mail.yourdomain.com
MAIL_PORT=465
MAIL_USERNAME=noreply@yourdomain.com
MAIL_PASSWORD=
MAIL_FROM_ADDRESS=noreply@yourdomain.com
MAIL_FROM_NAME="${APP_NAME}"

# ── Local development overrides ───────────────────────────────────
# When APP_ENV=local, uncomment these and comment out the production values above:
# APP_DEBUG=true
# DB_HOST=127.0.0.1
# SESSION_SECURE_COOKIE=false
# CACHE_STORE=file
# MAIL_MAILER=log
# LOG_LEVEL=debug
