Laravel 5 view not found when using vagrant and manor

UPDATE STANDARD

Instead of using return view('welcome');

now I used return 'woo. It works.'

which made it work. So it seems like the looks are fucking. Does anyone know if I might be right with my assumption? Because the stacktrace of the error says something along the lines

in FileViewFinder-> findInPaths ('welcome', array ('/ Users / mknb / work / API / testproject / resources / views'))

But isn't it worth talking about /home/vagrant/testproject/resources/views

?

UPDATE END


I've been using Laravel since a few weeks or months and now want to use Laravel along with Homestead. The problem that I ran today, after my editing Homestead.yaml

, /etc/hosts

and began vagrant vagrant up

I get an error message

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

When using the same project without Homestead / Vagrant, but with virtual hosts instead, I have no problem. So what could be causing this?

This is my Homestead.yaml


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

authorize: /Users/mknb/.ssh/id_homestead.pub

keys:
    - /Users/mknb/.ssh/id_homestead

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

sites:
    - map: testproject.app
      to: "/home/vagrant/testproject/public"

databases:
    - homestead

variables:
    - 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 /etc/hosts

192.168.10.10 testproject.app

Well, at least it looks like it works, that the server is running, etc., but why am I getting this error? I also tried to clear the config cache and route cache with the following two commands

php artisan config:cache

and php artisan:route:cache

Line 2 on the stack looks like this:

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

      

But shouldn't my roving path be established here? Could this be the problem?

+3


source to share


1 answer


Finally I solved the problem.



I connected to my firewall with vagrant ssh

and then went to my test project cd testproject

and ran the command to restore the configuration withphp artisan config:cache

+8


source







All Articles