-
Notifications
You must be signed in to change notification settings - Fork 0
Set Up Local Development Environment
- Composer (installed globally) - Installation Guide
- VirtualBox
- Vagrant
- SSH Key
Clone the repository to a folder of your choice on your machine.
We'll assume
~/Code
is the folder you work out of in the examples below.
Open up Terminal and run the following commands. Replace ~/Code
with whatever folder you want.
cd ~/Code
git clone https://github.com/nawhas/nawhas-dot-com.git
cd nawhas-dot-com
Copy the sample environment file .env.sample
in the project root and save it as .env
. No changes should be necessary right now.
Install composer dependencies and prepare the development VM.
composer install
php vendor/bin/homestead make
In your editor, open up the newly created Homestead.yaml
file in the project root and make the following changes:
- In line 19, change
homestead.app
tonawhas.app
.
Create the development VM. This may take a few minutes.
vagrant up
Log into the newly created VM.
vagrant ssh
cd nawhas-dot-com
Generate an encryption key (in the VM)
php artisan key:generate
Migrate Database Tables
php artisan migrate
Edit your hosts file to map nawhas.app
to your VM. In your terminal, do the following.
sudo nano /etc/hosts # you may be asked for your password.
In this file, add the following line:
192.168.10.10 nawhas.app
Close the file by pressing Control + X
and enter Y
to save the changes.
You should be ready to go now! Open up http://nawhas.app in your browser and you should see the homepage!