Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Problems with a pulled laravel project

Hey!

Me and a friend are working on a school project and we have an issue with our pulled project.

  • So first of all, I created our laravel environment with artestead (custom made homestead of our school).

  • Pushed the entire project onto bitbucket

When he pulls the project some files are missing like our artestead.yaml(because of the .gitignore).

So he created a new one with ".." --type laravel, and whenever he tries to "vagrant up" he gets an empty folder. So he can't open the project in his browser.

Does anyone have an idea why this happens?

1 Answer

Lee Ravenberg
Lee Ravenberg
10,018 Points

What do you mean with "So he created a new one with ".." --type laravel, and whenever he tries to "vagrant up" he gets an empty folder" ?

When changing configurations in your Homestead.yaml file its likely you need to re-provision your vagrant box. Otherwise I would go and re-install Vagrant globally on your computer. https://laravel.com/docs/5.2/homestead#first-steps

How to deal with domain mapping?

So how do you access your project in homestead via browser? You can do this by mapping a domain name to a given folder in your homestead.yml file. Type the following command: homestead edit. It wil fire you your default editor.

folders:
    - map: ~/Code
      to: /home/vagrant/Code

sites:
    - map: homestead.app
      to: /home/vagrant/Code/Laravel/public
    - map: myproject.dev
      to: /home/vagrant/Code/sandbox/myproject/public

In the folders property I map my local folder to the one in the virtual environment. In the sites property I map it on a project level.

However, simply mapping your project to a domain name like myproject.dev wont be enough. You need to define this in your host file also.

192.168.10.10       myproject.dev

Note that the IP address isnt 127.0.0.1, but 192.168.10.10.

I asked our teacher myself a few days ago and there was something wrong with the 'NFS' in Vbox. It was impossible to figure it out ourselves. But thank you for your reply. Upvoted it :D