How to set up Laravel.

Requirements PHP >= 5.5.9

Install Xampp

First of all, we need Xampp, so we can download it from the official page:
Download Xampp


After you’ve downloaded and installed Xampp, we need to install Composer.

Composer is a PHP package manager that is integrated with Laravel Framework. In Windows we can install it easy going to the official page and download the installer.

Composer Download page

Xampp Virtual Host

We will configure a Virtual Host in Xampp for a Laravel project, and in this example, we want to configure the domain for our project.

We need to edit httpd-vhosts.conf that is located in C:\xampp\apache\conf\extra\httpd-vhosts.conf and add following lines at the end of the file:

# VirtualHost for LARAVEL.DEV

DocumentRoot “C:\xampp\htdocs\laravel\public”

ServerAdmin “C:\xampp\htdocs\laravel”>

Options Indexes FollowSymLinks AllowOverride All Require all granted

After this, our apache is listening to connections, but we have to configure our hosts file that allows to redirect to the localhost that is located in C:\Windows\System32\drivers\etc

IMPORTANT!: To edit this file, maybe we should give access, click properties and allow your user to modify this file.
Edit hosts file adding our localhost for

# localhost name resolution is handled within DNS itself.

# localhost

# ::1 localhost

Save the file and we are ready to install laravel.

Install Laravel Framework

We are prepared to install and configure a Laravel Framework. First of all, we have to navigate to htdocs folder to install it and run this following command:

composer create-project laravel/laravel laravel “5.1.*”

Will start the installation of the Framework:

When it finishes, it will create following directory schema:

Finally, start our apache and MySql from Xampp control panel:


Navigate to and Laravel it’s installed!

Leave a Reply