Getting Started with Laravel | Installation

0
386
Laravel Installation Successful

As we have discussed in our previous blog about what laravel is and why laravel is so popular among list of other php framework’s. Now lets get started with how to install laravel and Set up the environment to code your first project on laravel.

STEP -1 : Setting up a local Development Server For Laravel

You’ll need to download a local web server software stack like WAMP, XAMPP, AMPP which basically is a collective of Apache web server, open SSL fir SSL , PHP and mysql database.

Laravel also provides its own prepackaged Vagrant box that provides you a best development environment without requiring you to install PHP, a web server, and any other server software on your local machine. But you need to install virtual box ,parallels or hyper -V and vagrant according to the OS you use to run the laravel’s homestead environment.

There are some pre – requisites for the server which you need to know if you installed the server manually as laravel’s homestead meets all the necessary server requirements.The following are the pre requisites needed for laravel php development environment :

  • PHP version should be greater than or eqal to >= 7.1.3
  • Server should include OpenSSL PHP Extension
  • Server should include PDO PHP Extension
  • Server should include Mbstring PHP Extension
  • Server should include Tokenizer PHP Extension
  • Server should include XML PHP Extension
  • Server should include Ctype PHP Extension
  • Server should include JSON PHP Extension
  • Server should include MCrypt PHP Extension

STEP -2 : Downloading and Installing Composer

Laravel uses Composer which is an application-level package manager for the PHP programming language. Composer provides a standard format for managing dependencies of PHP software and required libraries. So, its necessary to install composer in the server that will host the web application.
You can download composer from the following link   https://composer.org/download/

For windows :
You can directly install the Composer-Setup.exe. file to any location you prefer then the composer will prompt you to locate the php.exe file.

1- Double click Composer-Setup.exe.

2- In Installation Option screen, select the Developer mode and then Click Next.

3- Give an appropriate path to your Composer example C:\composer\

4- Choose command line php you want to use for example : I use ampps and my php executable file resides

in the following path C:\Program Files (x86)\Ampps\php-7.1\php.exe . The path for php executable file can be different according to the local server app we use. And click Next to Finish the installation.

STEP -3 : Setting up PATH

After the installation of Dependency manager for php i.e. ‘Composer’. We now configure environment PATH variable for composer to access it from any directory.

  1. RIght Click My PC in your Desktop and click on Properties.
  2. Go to Center Right Corner of the popup window and click on Change Settings.
  3. Go to Advanced Tab From the popup windows and click on Environment Variables.
  4. Go to System Variables Select Path Row from the Variable Column and Click on Edit .
  5. Add the path where you have installed Composer, for example: ‘C:\composer’ .
  6. Click on Ok.

STEP -3 : Installing Git

  1. Click here to Download Git For flavors of OS.
  2. Accept the policy and Click Next.
  3. Choose the default option and select next
  4. The default path of GIT will be  C:\Program Files\Git

STEP-4: Becoming a PHP Artisan

  1. Go to the Directory where yopur local server serves the file. Example Ammps Serves the files from directory C:\Program Files (x86)\Ampps\www  and xampp serves from the directory ‘htdocs’.
  2. Right Click and Click on GIT Bash .
  3. Type the following code to create a blog using laravel
    composer create-project laravel/laravel laravelsite
  4. Go to your Browser and insert the url http://localhost/laravelblog/public
    http://localhost/laravelsite/public

Voilà !!!!!! 

Laravel Installation Successful

You are awesome!!

LEAVE A REPLY

Please enter your comment!
Please enter your name here