$credentials = app_path();
结果为:
[Symfony\Component\Debug\Exception\FatalThrowableError] 调用未定义的函数 App\LtClasses\app_path()
但是在这里它被列为一个帮助函数: https://laravel.com/docs/5.3/helpers#method-app-path
$credentials = app_path();
结果为:
[Symfony\Component\Debug\Exception\FatalThrowableError] 调用未定义的函数 App\LtClasses\app_path()
但是在这里它被列为一个帮助函数: https://laravel.com/docs/5.3/helpers#method-app-path
这些是Laravel文档,但在Lumen上您无法使用相同的帮助程序,您可以查看Lumen框架附带的帮助程序,位于
/vendor/laravel/lumen-framework/src/helpers.php
实现您所需功能的解决方案可能为
app()->path();
app('path');
base_path('app');