Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.

Set Up Local Development Environment

Zain Mehdi edited this page Jun 11, 2016 · 5 revisions

Mac OS X

Prerequisites

Getting Started

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 to nawhas.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!

Clone this wiki locally