Skip to content
Advertisement

Laravel not creating projects in Code-Folder

I have a fresh new installation of homestead an wanted to initiate my first Laravel project.

It seems, that

composer create-project --prefer-dist laravel/laravel Laravel

is always creating the Project not in the Code folder, but in root. Maybe this is the reason, why my mapping to my windows folder isn’t working, too.

This is my Homestead.yaml

---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox

authorize: c:/Users/mfirg/.ssh/id_rsa.pub

keys:
    - c:/Users/mfirg/.ssh/id_rsa

folders:
    - map: c:/Homestead_Projects
      to: /home/vagrant/Code

sites:
    - map: homestead.test
      to: /home/vagrant/Code/Laravel/public
    - map: myproject.test
      to: /home/vagrant/Code/MyProject/public
    - map: myapp.test
      to: /home/vagrant/Code/MyApp/public

databases:
    - homestead
 
features:
    - mysql: false
    - mariadb: false
    - postgresql: false
    - ohmyzsh: false
    - webdriver: false

I tried it with 3 projects now, but every project is created in root and the shared folder remains empty

enter image description here

it would be AMAZING if some of guys had an idea how to solve my problem!

Advertisement

Answer

use the full path of the project, such as

C:/Users/user/Code/Homestead_Projects.

or you can follow the steps provided in the below link

https://laravel.com/docs/8.x/homestead#first-steps

this video help you too

https://www.youtube.com/watch?v=hsrWKTKvTM0

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement