Laravel 5 - View [home] not found

我的梦境 提交于 2019-12-07 02:33:44

问题


I ran composer update and now I'm running into an issue. I'm getting this error when I'm trying to load my home view:

InvalidArgumentException in FileViewFinder.php line 140:
View [home] not found.

Yes, files exists in my directory (resources/views, etc.). Name is home.blade.php.

My controller:

<?php namespace Hulahoop\Http\Controllers;

use Hulahoop\Http\Requests;
use Hulahoop\Http\Controllers\Controller;

use Illuminate\Http\Request;

class HomeController extends Controller {

    /**
     * Display a listing of the resource.
     *
     * @return Response
     */
    public function index()
    {
        return view('home');
    }

}

Route:

Route::get('/', 'HomeController@index');

This was working fine and it's very basic function. What happened? Running on local homestead FYI.

UPDATE: When I run php artisan serve, I can view the home page view fine (i.e. on http://localhost:8000). But on homestead, no dice. What gives?


回答1:


There seem to be a problem with vagrant and php artisan config:cache. If you run php artisan config:clear and then try to open the page - you should see it working fine - just make sure you don't cache it via artisan.




回答2:


Check out [ vendor/config.php ] it's hard-coded for local development.



来源:https://stackoverflow.com/questions/28578012/laravel-5-view-home-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!