Laravel view not found exception Laravel view not found exception php php

Laravel view not found exception


This error also occurs when you try to move the whole project directory to other path. And you happened to run the following commands below BEFORE you move.

php artisan optimize --forcephp artisan config:cachephp artisan route:cache

Mine error message shows like thisenter image description here

As you can see the old path was written in the compiled.php. So, to fix the problem. Simply run the same command AGAIN under the project folder in your new folder location.

php artisan optimize --forcephp artisan config:cachephp artisan route:cache

Hope this helps.


This happens when Laravel doesn't find a view file in your application. Make sure you have a file named: index.php or index.blade.php under your app/views directory.

Note that Laravel will do the following when calling View::make:

  • For View::make('index') Laravel will look for the file: app/views/index.php.
  • For View::make('index.foo') Laravel will look for the file: app/views/index/foo.php.

The file can have any of those two extensions: .php or .blade.php.


This command works for me

php artisan config:cache

As Laravel doc says that by default, Laravel is configured to use the file cache driver, which stores the serialized, cached objects in the filesystem. So it needs to recache the file system so that newly added views and route are available to show. I also not sure why laravel needs to recache actually