How to install laravel

How to install laravel

Laravel is a free, open-source, powerful and fully MVC based framework. Laravel provides rich set of features and functionalities which speed up website development process. In this blog, we are going understand laravel installation process.

Server Requirements for laravel installation —

The Laravel framework has a few system requirements. Of course, all of these requirements are satisfied by the Laravel Homestead virtual machine, so it’s highly recommended that you use Homestead as your local Laravel development environment.

Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine.

However, if you are not using Homestead, you will need to make sure your server meets the following requirements:
PHP >= 7.1.3
OpenSSL PHP Extensions
PDO PHP Extensions
Mbstring PHP Extensions
Tokenizer PHP Extensions
XML PHP Extensions
Ctype PHP Extensions
JSON PHP Extensions
BCMath PHP Extensions

Installing Laravel –

Laravel utilizes Composer to manage its dependencies. So, before using Laravel, make sure that you have Composer installed on your machine.

Via Laravel Installer –

First, Go to your command prompt to download the Laravel installer using Composer:
composer global require laravel/installer

Once installed, the laravel new command will create a fresh Laravel installation in your directory you specify. For instance, laravel new blog will create a directory named blog containing a fresh Laravel installation with all of Laravel’s dependencies already installed:
laravel new blog

Via Composer Create-Project –

Alternatively, you may also installed Laravel by issuing the Composers create-project commands in your terminal:
composer create-project --prefer-dist laravel/laravel blog

Local Developments Server –

If you have PHP installed locally and you would like to use PHP’s built-in development server to serve your application, you may use the serve Artisan command. This command will start a development server at http://localhost:8000:
php artisan serve

Public Directory –

After installing Laravel, you should configure your web server’s document / web root to be the public directory. The index.php in this directory serves as the front controller for all HTTP requests entering your applications.

Configuration File –

All of the configuration file for the Laravel framework are stored in the config directory. Each options is documented, so feels free to look through the files and get familiar with the options available to you.