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 trialSolomon Scott
20,586 PointsLaravel - How to set up a different project
I'm trying to set up a different project besides the one I did for the tutorial. When I try to use the Homestead.yaml to change where the laravel.dev localhost points, I sill get the old project. I'm not sure if there is anything else I have to change?
3 Answers
geoffrey
28,736 PointsI'm still following the tutorial and thus haven't tried to create another project yet. But I think the matter is to change information in the host file.
For exemple I'm on linux, the host file is located at /etc/hosts If I open that file I have this and some others information I deleted:
127.0.0.1 laravel.dev /* Which is what I set for the tutorial.
127.0.0.1 newProject.dev /* Which is what I would add for another project*/
127.0.0.1 localhost
127.0.1.1 Geo-On-The-Web
This way, now I could access it by typing newProject.dev:8000, such as we do in the tutorial.
Aj Villalobos
1,864 PointsDid you generate a new laravel project for that? I'm not sure you could do that.
composer create-project laravel/laravel [project]
geoffrey
28,736 PointsWhat does exactly the vagrant provision command do ? It takes into considerations the changements done in the Homestead Yaml file ? I've checked the vagrant documentation https://docs.vagrantup.com/v2/cli/provision.html but it doesn't talk a lot to me...
Solomon Scott
20,586 PointsFrom what I read, that is exactly what it does.
Solomon Scott
20,586 PointsSolomon Scott
20,586 PointsI just did that and everything work perfectly. Thanks!
thomascawthorn
22,986 Pointsthomascawthorn
22,986 PointsJust in case you swapped out the entire site: section for a new project, you can add multiple sites to homestead.yaml
After you've made your changes in Homestead.yaml, run
vagrant provision