Laravel 5 view not found when using vagrant and homestead

I’m using Laravel since a few weeks or months now and now wanted to also use Laravel together with Homestead. The problem I’m having now, is, after editing my Homestead.yaml,the /etc/hosts and starting vagrant vagrant up I’m getting the error

InvalidArgumentException in FileViewFinder.php line 137:
View [welcome] not found.

When using the exact same project without Homestead/Vagrant but with Virtual Hosts instead, I’m having no problems. So what could cause this?

This is my Homestead.yaml

ip: ""
memory: 2048
cpus: 1
hostname: testproject
name: testproject
provider: virtualbox

authorize: /Users/mknb/.ssh/

    - /Users/mknb/.ssh/id_homestead

    - map: "/Users/mknb/work/API/testproject"
      to: "/home/vagrant/testproject"

    - map:
      to: "/home/vagrant/testproject/public"

    - homestead

    - key: APP_ENV
      value: local

# blackfire:
#     - id: foo
#       token: bar
#       client-id: foo
#       client-token: bar

# ports:
#     - send: 93000
#       to: 9300
#     - send: 7777
#       to: 777
#       protocol: udp

And this is the /etc/hosts

Well, at least it seems to work, that the server has been started, etc. but why am I getting this error? I also tried to clear my config cache and route cache with the following two commands

php artisan config:cache and php artisan:route:cache

Line 2 of the stacktrace looks like this

at FileViewFinder->findInPaths('welcome', array('/Users/mknb/work/API/testproject/resources/views')) in FileViewFinder.php line 79

But shouldn’t my vagrant path be set here? Can this be the problem?

Source: laravel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.