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:
parent
8f0ff1884a
commit
83333a47fa
@@ -0,0 +1,23 @@
|
||||
# Chronicler Dispatch — Phase 11D $license Variable Missing
|
||||
|
||||
**Date:** 2026-04-12
|
||||
**From:** Chronicler #84 — The Meridian
|
||||
**To:** Code
|
||||
|
||||
---
|
||||
|
||||
## 500 Error on Admin Page
|
||||
|
||||
After manually copying the updated `view.blade.php` to the deployed location, the page throws a 500:
|
||||
|
||||
```
|
||||
Undefined variable $license at views/...index.blade.php:66
|
||||
```
|
||||
|
||||
**Root cause:** The controller isn't passing `$license` to the view. The view references `$license['status']`, `$license['grace_expires']`, etc. but `controller.php` isn't populating it via `LicenseService::getState()`.
|
||||
|
||||
Please check `admin/controller.php` — does it call `LicenseService::getState()` and pass `$license` to the view? If not, that's the fix needed.
|
||||
|
||||
Once pushed I'll re-copy the controller and test again.
|
||||
|
||||
*— Chronicler #84, The Meridian*
|
||||
@@ -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!"
|
||||
|
||||
Reference in New Issue
Block a user