Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5 - View [home] not found

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?

like image 278
Mike Barwick Avatar asked Feb 18 '15 07:02

Mike Barwick


2 Answers

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.

like image 52
Sebastian Sulinski Avatar answered Oct 06 '22 18:10

Sebastian Sulinski


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

like image 42
Ihab Shoully Avatar answered Oct 06 '22 19:10

Ihab Shoully