feat: add signer name and title fields to invoices with toggleable UI visibility

This commit is contained in:
I-Fun
2026-04-05 13:10:07 +07:00
parent 12d44cbecc
commit ed9e7dc0fd
8 changed files with 178 additions and 93 deletions

View File

@@ -20,11 +20,27 @@ if [ ! -f .env ]; then
fi
# ── 2. Generate APP_KEY if empty ────────────
if grep -qE '^APP_KEY=$' .env 2>/dev/null; then
echo "[key] Generating application key…"
php artisan key:generate --force --quiet
if ! grep -qE '^APP_KEY=base64:' .env 2>/dev/null; then
echo "[key] Generating application key directly…"
# 2a. Clear cached configs that might cause MissingAppKeyException
php artisan config:clear --quiet 2>/dev/null || true
# 2b. Generate native base64 key
NEW_KEY="base64:$(php -r 'echo base64_encode(random_bytes(32));')"
if grep -q '^APP_KEY=' .env 2>/dev/null; then
# Replace existing empty/invalid APP_KEY safely
sed -i "s|^APP_KEY=.*|APP_KEY=$NEW_KEY|" .env
else
# Append nicely
echo "APP_KEY=$NEW_KEY" >> .env
fi
fi
# 2c. Force Laravel to read from .env by ditching Docker's empty OS injection
unset APP_KEY
# ── 3. Ensure SQLite database file exists ───
if [ ! -f database/database.sqlite ]; then
echo "[db] Creating SQLite database file…"