Laravel –The PHP Framework For Web Artisans2
In the last blog, we have covered What is Laravel and its features. I hope everybody has understood that what Laravel is and why we will use it. In this blog, we will learn about Laravel and its components. First of all, we will discuss how to set up Laravel in Local Machines and Live Server.How to set up Laravel in local machine?
To set up Laravel in local machine we need a web server like Apache, Nginx, IIS, etc which support PHP & if you wish to interact with Database then MySQL, Oracle or MSSQL DB. Alternatively, you can also download any third-party software and install into your local machine (Like XAMPP, WAMPP). After that, download Laravel from its official website or Git Hub. If you download Laravel form its official website then you need to install Composer first. The obvious question to arouse is “What is Composer”? Composer is an application-level package manager for PHP which provides a sophisticated format for managing dependencies of PHP software and required libraries. It was developed by Nils Adermann and Jordi Boggiano.After installing Composer in your local system at first check your local server requirements. If you install Laravel 5.7(Current Version) the requirements are:-
-
PHP >= 7.1.3
-
OpenSSL PHP Extension
-
PDO PHP Extension
-
Mbstring PHP Extension
-
Tokenizer PHP Extension
-
XML PHP Extension
-
Type PHP Extension
-
JSON PHP Extension
Step 1: Laravel Installer:
At first download the Laravel installer using Composer :composer global require laravel/installer
Before execute the above command please make sure that Composer’s system wide vendor directory is in your $PATH variable so the laravel executable can be located by your system. This directory may be located in different location depending on which Operating system you are using. Basically the common locations are:-
macOS: $HOME/.composer/vendor/bin
-
GNU / Linux Distributions: $HOME/.config/composer/vendor/bin