如何配置Laravel路径?

时间:2014-07-29 03:45:18

标签: laravel

我正在尝试安装Laravel 我的问题是:

/ localhost / laravel显示其内容,如其下的文件夹。

但是我期待像laravel的标志和文字“你已经到了。”

我相信错误是我的paths.php中的错误:

return array(

/*
|--------------------------------------------------------------------------
| Application Path
|--------------------------------------------------------------------------
|
| Here we just defined the path to the application directory. Most likely
| you will never need to change this value as the default setup should
| work perfectly fine for the vast majority of all our applications.
|
*/

'app' => __DIR__.'/../app',

/*
|--------------------------------------------------------------------------
| 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',

/*
|--------------------------------------------------------------------------
| Base Path
|--------------------------------------------------------------------------
|
| The base path is the root of the Laravel installation. Most likely you
| will not need to change this value. But, if for some wild reason it
| is necessary you will do so here, just proceed with some caution.
|
*/

'base' => __DIR__.'/..',

/*
|--------------------------------------------------------------------------
| Storage Path
|--------------------------------------------------------------------------
|
| The storage path is used by Laravel to store cached Blade views, logs
| and other pieces of information. You may modify the path here when
| you want to change the location of this directory for your apps.
|
*/

'storage' => __DIR__.'/../app/storage',

 );

和index.php

 require __DIR__.'/../bootstrap/autoload.php';


 $app = require_once __DIR__.'/../bootstrap/start.php';


 $app->run();

1 个答案:

答案 0 :(得分:2)

这不是你的道路。您应该创建一个虚拟主机并将虚拟主机的根指向laravel/public