Creating a Laravel project in Homestead.
Last updated
Last updated
In this topic we will create a basic laravel project to test our newly configured Laravel Homestead development environment.
To start launch the Homestead Virtual Machine which was discussed in detail in our previous topic .
Once the Homestead virtual machine is up and running, you can connect to it using SSH.
Open Windows Terminal, and navigate to the Homestead
directory.
In the terminal or command prompt, run the following command:
This command will connect you to the Homestead virtual machine.
Run the following command to navigate to code
directory:
Then, run the following command to create a new Laravel project:
Please wait, this will install the dependencies for the new project.
Below shows that you have successfully a new laravel project.
Run the following command to navigate to the project directory:
Your project will now open to your default browser.
You can now open your project in the VS Code and start coding.
That's it! You have successfully created a Laravel project in Homestead and launched it on your local machine. You can now start developing your Laravel application using the Homestead virtual environment.
The project name mylaravelapp
is the project name we set in our previous topic
You can also directly check the project in the code directory we created in the previous topic .
The application is now accessible to the hostname we configured in the topic.
You can check to site for the detail of the documentation.
In the next topic, we will create a Laravel API project and test the API on .