How to clone my own Laravel project, given that the provider is ignored

I am looking for help in solving the entire process of setting up a Laravel project. This is currently my list of passes:

  • Install Virtual Box and Vagrant.
  • Run vagrant box add laravel/homestead
  • Run git clone https://github.com/laravel/homestead.git Homestead in your favorite folder using your favorite Bash (in my case I use Git Bash because I'm on Windows 10)
  • Set your SSH keys using ssh-keygen -t rsa -C "email@domain.blah"
  • Install the SSH connector file [¹].
  • Customize your Homestead.yaml as you wish.
  • Run init.sh / init.bat .
  • SSH to the tramp.
  • run composer global require "laravel/installer"
  • run laravel new project
  • Return to the main computer in the project folder and run git init , git add . , git commit -m "clean project"
  • Click on the git remote add origin https://bitbucket.org/you/yourproject project git remote add origin https://bitbucket.org/you/yourproject and git push -u origin --all

Now I have a new Laravel project plugging into Git for version control. My problem is that Laravel ignores /vendor by default. Given this fact, I want to clone my project on another computer, because I have 2 computers to work with and / or a colleague wants to clone the same project so that we can work on it together.

What will be the correct walkthrough to clone a project and work with Laravel on another machine? Should I add /vendor to the repository and click? Should I add a homestead field to the vault? If so, how?

Thanks in advance.

 [¹] Host homestead HostName 127.0.0.1 User vagrant Port 2222 
+8
git laravel-5 homestead
source share
1 answer

Make sure your Git repository includes the composer.json linker (package options) and composer.lock (optional, but recommended by Composer to ensure 100% compliance across all servers), but does not contain the vendor or .env folder (on at the moment it looks like you are adding everything with git add. '- which is unsafe). The standard deployment practice (“clone”) of your code will be:

  • git clone https://bitbucket.org/you/yourproject (on the remote computer)
  • cd yourproject
  • composer installation (this will create a vendor folder and download all packages)
  • Create and edit the .env file

Pretty simple!

In addition, you can find a number of services on the Internet that can deploy your application automatically when the BitBucket repository has updates.

+20
source share

All Articles