Step-by-Step Guide to Installing Laravel for Beginners
We can install Laravel very easily with multiple waysSo, 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
- Install Laravel via Composer Installer
- Install Laravel via Composer Create-Project command
- 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"
globally on your system. This allows you to create new Laravel projects from anywhere on your
system by using the laravel new command.
Download different older or new versions
Replace blog with your desire project name. These commands downloads Laravel and its dependencies, creating a new project directory for you
2) Install Laravel via Composer Create-Project command
composer create-project --prefer-dist laravel/laravel blog
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