How to Install Laravel 5

Laravel Installation Guide for Beginners

You can use Laravel installer. There are some server requirements needed, but don’t worry too much over it. You can use Laravel Homestead virtual machine that satisfy every prerequisite.

Otherwise, you make sure that latest PHP, that is greater or equal to 5.5.9 is there. Now we are prepared to install Laravel through Laravel Installer. I assume you have already installed Composer. Now issue this command:
composer global require “laravel/installer=~1.1”
As I said before, when this book was being written, Laravel 5.1.4 had been released. So that is the latest stable version that you get if you visit Laravel official web site till July, 2015. So if you install Laravel through Installer you get the latest stable version. Now it is pretty easy to start your project. Go to your folder where you want to start your project and just type:
laravel new my-app
Your new project ‘my-app’ will be ready in a few minutes if you have a steady INTERNET connection. But personally I prefer installation through Composer. So I have issued this command in my terminal and have chosen to get the more latest development distribution.
composer create-project laravel/laravel my-app dev-develop
It is quite interesting to see the procedures as you can look into the file structures pretty early as Composer is installing the prerequisite packages you need to run your latest laravel application. n the second picture it is being shown what packages are being installed. You can see ‘nesbot/carbon’, ‘symfony/debug’ or ‘symfony/httpfoundation’ among the oters. As the book progresses you will find how this packaged versions of libraries will benefit your project from every possible aspects.
It will write the lock file and removing all existing .git, .svn files it will install its own and finally generated the 32 characters application key.
This key is extremely important for your laravel application as it will, in future, handle all kinds of security issues and except this unique key, your application is vulnerable to any kind of attacks. As you see there are 10 folders. And they are as follows:

app
bootstrap
config
database
public
resources
storage
tests
vendor

And there are few important files like
composer.json etc.
Now we are going to see whether our new Laravel application is working perfectly or not. Let me go to the project’s folder ‘my-app’ with this command:
cd /var/www/html/my-app
In your case it might be different. I love using Ubuntu 14 latest. In case you use ‘Mac’ your commands will not differ much. But for the windows user I’d recommend to consult the Laravel documents. Also in the Composer official web site you will find how to install it. But I suggest avoiding Windows.
Now all I need to write down:
php artisan serve
And it will immediately issue this command:
Laravel development server started on http://localhost:8000/
Now we are at the end point of our Laravel installation part.
If we open up our browser we will be greeted with a nice message from the Laravel quote repositories.

Well you have come at last!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s