I'm looking for help on dealing with the whole setup process of a Laravel project. Currently this is my walkthrough list:
vagrant box add laravel/homestead
git clone https://github.com/laravel/homestead.git Homestead
on your favorite folder, using your favorite Bash (in my case I'm using Git BASH because I'm on Windows 10)ssh-keygen -t rsa -C "[email protected]"
init.sh
/ init.bat
.composer global require "laravel/installer"
laravel new project
git init
, git add .
, git commit -m "clean project"
git remote add origin https://bitbucket.org/you/yourproject
and git push -u origin --all
Now I have a brand new Laravel project hook up to Git for versioning. My problem is that Laravel ignores /vendor
by default. Considering this fact, I want to clone my project in another computer because I have 2 computers to work and/or a co-worker wants to clone the same project so we can work on it together.
What would be the proper walkthrough to clone the project and have Laravel work on another machine? Do I have to add /vendor
to the repository and push? Should I add the homestead box into the repository? If so, how?
Thanks in advance.
[¹]
Host homestead
HostName 127.0.0.1
User vagrant
Port 2222
Ensure that your Git repository includes composer.json (package settings) and composer.lock (optional, but recommended by Composer to ensure 100% version match across all servers) files, but doesn't include 'vendor' folder or .env file (at the moment it looks like you are adding everything with 'git add .' – which is not safe). A standard practice to deploy ('clone') your code would be:
Pretty simple really!
Moreover, you can find a number of services in Internet that can deploy your application automatically whenever BitBucket repository has updates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With