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 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.
Now write the following command
composer create-project laravel/laravel projectname
Once you press ENTER you will see something like this.
When installation finishes you will see this at end.
Now simply move to your project directory like this.
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.
php artisan serve
Now just open the http://localhost:8000 on your browser. You will see the default page of laravel.
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.