- download/clone the git repository from
git clone https://github.com/karlkras/cms.git
- navigate into the project folder
cd cms
- make sure not to work directly on the master branch
git checkout -b my_local_branch
- to prepare the vagrant configuration, run
vendor/bin/homestead make
orvendor/bin/homestead.bat make
on Windows
- adjust the
hosts
file and the newly createdHomestead.yaml
in the root of the repo according to your needs. Usually that includes:- adjust
ip
- make sure the
ip
is not already used in your local network
- make sure the
- add a couple of entries to your host file
[IP] cms.test
(e.g.192.168.10.10 cms.tet
)[IP] phpmyadmin.test
(e.g.192.168.10.10 phpmyadmin.test
)- location on Unix:
/etc/hosts
- location on Windows:
C:\Windows\System32\drivers\etc
- adjust
- adjust
folders
andsites
mapping (optional; it should be set up correctly by default if you followed the steps above). Watch out for the following:- the
folders: - map: "[PATH]"
should point to the absolute path to thecube
repository on your local machine - the
folders: to: "[PATH]"
denotes the path on your vagrant machine that is mapped to the above mentioned path on your local machine, so that you can access your local files within the vagrant box. - the
sites: - map: "[HOSTNAME]"
denotes the hostname that the nginx is looking for to serve content on- you should adjust that to the hostname chosen for your hostfile (e.g.
cms.test
) although it not necessary since nginx will even respond to another hostname
- you should adjust that to the hostname chosen for your hostfile (e.g.
- the
sites: - to: "[PATH]"
denotes the absolute path withing the vagrant box that the above mentioned hostname uses asroot
path for content. This should be the path to thepublic
folder of this repository
- the
- start the vagrant box with
vagrant up
, ssh into it withvagrant ssh
, switch to the project folder (by default, this should becd /home/vagrant/code/cms/
) and install the project's dependenciescomposer install
- setup laravel by generating an application key and setting up the .env file:
- php artisan key:generate
cp .env.example .env
- generate the meta data files for better code completion
php artisan ide-helper:meta
php artisan ide-helper:generate
php artisan ide-helper:model
You should now be able to open http://cms.test/ and http://phpmyadmin.test/ in your browser and see the Laravel welcome page :)