Monday, 23 October 2017

Step-by-Step Guide to Installing Laravel for Beginners

Step-by-Step Guide to Installing Laravel for Beginners

We can install Laravel very easily with multiple ways
So, before Laravel installation, please make sure that you have installed Composer on your machine.

There are different ways to install Laravel framework. Few of them are as follow
  1. Install Laravel via Composer Installer
  2. Install Laravel via Composer Create-Project command
  3. Downloading Laravel framework repo from github

1) Install Laravel via Composer Installer

We can download and install laravel via composer installer.

composer global require "laravel/installer"

Running the command composer global require "laravel/installer" will install the Laravel installer 
globally on your system. This allows you to create new Laravel projects from anywhere on your 
system by using the laravel new command.

2) Install Laravel via Composer Create-Project command


composer create-project --prefer-dist laravel/laravel blog

Download different older or new versions

composer create-project laravel/laravel blog  "5.1.*"
composer create-project laravel/laravel blog  "5.2.*"

Replace blog with your desire project name. These commands downloads Laravel and its dependencies, creating a new project directory for you

3) Downloading Laravel framework repo from github

On github Laravel framework repo is also avaible.Github allow us to download Laravel framework repo in zip format.as you can see in the below screenshot.

Offical Github laravel repo link:  https://github.com/laravel/laravel



In above screenshot you can see the downloading zip button from where we can click and download
their laravel zip installation. Unzip after download the repo and execute the following command to 
install decencies 

compose install


Running laravel framework

After successfully installing lravel framework on your system or server, next step is to run
the laravel.To run the laravel framework we need to execute the following command in larave
directory.

php artisan serve



No comments:

Post a Comment

Laravel csrf token mismatch for ajax post request

Error "CSRF Token Mismatch" commonly occurs if tokens do not match in both sessions and sent , and received requests.CSRF token he...