在 Laravel Forge 中,在Quick Deploy
或上Deploy
,我在部署日志中看到了这个错误:
Generating autoload files
PHP Fatal error: Class 'Illuminate\Support\Arr' not found in
/home/forge/default/vendor/laravel/framework/src/Illuminate/Support/helpers.php
on line 182
PHP Stack trace:
PHP 1. {main}() /home/forge/default/artisan:0
PHP 2. require_once() /home/forge/default/artisan:30
PHP 3. Illuminate\Foundation\Application->detectEnvironment() /home/forge/default/bootstrap/start.php:33
PHP 4. Illuminate\Foundation\EnvironmentDetector->detect() /home/forge/default/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:262
PHP 5. Illuminate\Foundation\EnvironmentDetector->detectConsoleEnvironment() /home/forge/default/vendor/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php:18
PHP 6. Illuminate\Foundation\EnvironmentDetector->getEnvironmentArgument() /home/forge/default/vendor/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php:68
PHP 7. array_first() /home/forge/default/vendor/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php:89
据我所知,我已经正确设置了应用程序,包括Environment Variables
环境检测:
$env = $app->detectEnvironment(
array(
'development' => array('Thor','localhost'),
'production' => array('Removed for security')
));
在实际网站上,一旦部署(显然!)发生,这是错误日志:
我的完整start.php
代码是:
<?php
$app = new Illuminate\Foundation\Application;
$env = $app->detectEnvironment(
array(
'development' => array('Thor','localhost'),
'production' => array('removed for security')
));
$app->bindInstallPaths(require __DIR__.'/paths.php');
$framework = $app['path.base'].'/vendor/laravel/framework/src';
require $framework.'/Illuminate/Foundation/start.php';
return $app;
任何帮助将不胜感激。