我有一个正在开发的Laravel应用。当我将其上传到学院的服务器并尝试运行它时,它在我的本地环境上运行良好,但出现此错误:
Call to undefined function _() (View: /home/user/public_html/MeetHub/resources/views/auth/login.blade.php)
/home/user/public_html/MeetHub/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php
* @param array $__data
* @return string
*/
protected function evaluatePath($__path, $__data)
{
$obLevel = ob_get_level();
ob_start();
extract($__data, EXTR_SKIP);
// We'll evaluate the contents of the view inside a try/catch block so we can
// flush out any stray output that might get out before an error occurs or
// an exception is thrown. This prevents any partial views from leaking.
try {
include $__path;
} catch (Exception $e) {
$this->handleViewException($e, $obLevel);
} catch (Throwable $e) {
$this->handleViewException(new FatalThrowableError($e), $obLevel);
}
return ltrim(ob_get_clean());
}
/**
* Handle a view exception.
*
* @param \Exception $e
* @param int $obLevel
* @return void
*
* @throws \Exception
*/
protected function handleViewException(Exception $e, $obLevel)
编辑:
尝试过composer update
和composer dump
edit2:现在服务器和本地环境都具有相同的php版本。同样的错误。