laravel - 找不到InvalidArgumentException视图[pages.home]

时间:2016-07-07 15:57:28

标签: php laravel

我已经被这一天难倒了好几天了。当我尝试加载主页时出现此错误,我在标题中收到错误。我已经问了这个问题here并尝试将dd()放在页面顶部以及运行php artisan route:clear以及其他希望我可以加载主页的命令。有趣的是我可以加载用户登录功能没问题。

这是我的路线档案:

<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('pages.home');
});



Route::auth();

查看结构:

enter image description here

1 个答案:

答案 0 :(得分:1)

我发现了我的问题。我之前没有注意到这一点,但我在PhpStorm中的项目被保存到VM外的目录中。我为之前没有弄清楚而道歉。