Fix: build.sh clears Laravel cache after copying PHP classes

The admin controller was failing because Laravel's DI container had stale
class resolution cache. Added php artisan optimize:clear at end of build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude (Chronicler #83 - The Compiler)
2026-04-12 21:11:52 -05:00
parent 8f0ff1884a
commit 83333a47fa
2 changed files with 30 additions and 0 deletions

View File

@@ -106,6 +106,13 @@ mkdir -p app/Http/Controllers
cp "$EXT_DIR/app/Http/Controllers/ModpackAPIController.php" app/Http/Controllers/ModpackAPIController.php
echo "✓ Copied ModpackAPIController.php"
# ===========================================
# 4. CLEAR CACHES
# ===========================================
echo ""
echo "--- Cache Clear ---"
php artisan optimize:clear 2>/dev/null && echo "✓ Laravel caches cleared" || echo "⚠ Cache clear skipped (non-fatal)"
echo ""
echo "=========================================="
echo "ModpackChecker injection complete!"