Home » Php » php – Laravel 5 – View [home] not found

php – Laravel 5 – View [home] not found

Posted by: admin July 12, 2020 Leave a comment

Questions:

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('/', '[email protected]');

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?

How to&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.

Answer:

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