指定其他公共路径

egd*_*vid 5 laravel-5

我的Laravel应用程序在私人文件夹中工作,我需要告诉Laravel公共路径是不同的.今天我已经将Laravel应用程序从4.2升级到5.0,我找不到指定公共路径的位置,因为在Laravel 5.0中不再存在paths.php文件.

在laravel 4.2中我们有了/bootstrap/paths.php文件:

/*
|--------------------------------------------------------------------------
| Public Path
|--------------------------------------------------------------------------
|
| The public path contains the assets for your web application, such as
| your JavaScript and CSS files, and also contains the primary entry
| point for web requests into these applications from the outside.
|
*/

'public' => __DIR__.'/../../../public_html',
Run Code Online (Sandbox Code Playgroud)

我还没有使用Laravel 5.0文件夹结构,任何帮助将不胜感激.

Rub*_*zzo 13

完美无缺的是增加public/index.php了以下三条线:

$app->bind('path.public', function() {
    return __DIR__;
});
Run Code Online (Sandbox Code Playgroud)

这是在拉克拉斯特回答的.