One way to it, is to install Vagrant and virtual box. In vagrant, you would then have a Vagrant Box, where Laravel is pre-installed.
The Vagrant Box name with laravel within it is called Homestead.
The idea with Homestead is, that you have everything within one package, instead of 10 different packages (Ubuntu server, Git, PHP, Apache, Nginx, MySQL ect.)
So to answer the headline: Homestead is a Vagrant Box, and Laravel is an MVC Framework
Now to what I believe you really want to know:
You can easily follow these steps (https://laravel.com/docs/5.7/homestead)
But instead of installing a raw laravel installation, you would simply clone the one you want to work on.
Steps:
- Install vagrant and virtual box
- Create a new folder within your ~ dir, with name "code"
- CMD: vagrant box add laravel/homestead
- CMD: git clone https://github.com/laravel/homestead.git ~/Homestead
- CMD: cd ~/Homestead
- CMD: init.bat (for windows), bash init.sh (for MAC)
- NOTE: The above might not work from git bash, and you may need to go into
original CMD and CD to homestead holder.
- CMD: vagrant up
- CMD: vagrant SSH (from within Homestead holder, but not sure if it makes any difference if you are not within the homestead folder)
- At this point, when you LS you should see a folder named "code" and nothing else
- CMD: cd code
- CMD: git clone theRepositoryYouWant
Now a couple more things:
- Install HeidiSQL
- in HeidiSQL you use the data from Homestead.yaml (within your Homestead folder) to login to the database.
- Remember to
php artisan migrate
when you are on the server, within the "code" dir and have cloned the repository