Laravel Installation

The Laravel framework has a few system requirements:

  • PHP >= 5.4
  • MCrypt PHP Extension

Installation of Laravel is not similar to other frameworks where you just download the files and extract on your server.

Laravel needs composer for its installation.

Composer

Composer

Composer is a dependency manager or I can say package manager.

Suppose you need a library, login tool or any library for your application, Composer is going to help you in install and maintain it.

 

Once you installed the composer you need to open the command line tool.

Type composer and ENTER. You will see something like this

After this you are ready to install the Laravel.

 

To install the laravel first move to directory where you want to install the files.

Moved to htdocs of xampp

Now write the following command

Here “mylaravel” is the project name

Once you press ENTER you will see something like this.

Installing laravel

When installation finishes you will see this at end.

Application key shows installation is finished

Now simply move to your project directory like this.

Moved to project directory

 

Now your installation is done but we are still not finished yet.

We would obviously like to view our application on a browser.

Typically, you may use a web server such as Apache or Nginx to serve your Laravel applications.

But I recommend to use PHP’s built-in development server. For that we will write a command.

 

serve

Now just open the http://localhost:8000 on your browser. You will see the default page of laravel.

Laravel default page
Laravel default page

 

Congratulations! You have successfully installed the Laravel on your system.

Next time when you want to open this application on your browser then just start serve by php artisan serve command and that’s it.

Next we will study about the laravel directory structure.

Share this article: