透過 composer 升級 Laravel 後會出現以下錯誤訊息

Declaration of Illuminate\View\Engines\CompilerEngine::handleViewException() should be compatible with Illuminate\View\Engines\PhpEngine::handleViewException($e)

主要原因是在根目錄的bootstrap 底下多出一個 compiled.php 檔案定義一些 class loader

刪除即可恢復正常

Categories: Laravel