How to install Laravel 5 application in different versions

Laravel 5.3 framework has been just released. I won’t focus on new features about it right now, I will just make it clear how to install different versions of Laravel without a problem as for many especially new developers it causes problem. As Composer is standard for installing dependencies let’s use this method to install new Laravel applications.

To create brand new Laravel  project we will use composer create-project command (in command line). You will need to have obviously installed Composer itself.

Installation of Laravel 5.3 application

Ok, so when we want to install latest stable Laravel application we can use:

As your-project-name you should obviously put something else – the whole application will be put into this directory. Using this command we’ve just installed latest version of Laravel 5.3 application as it’s current master branch for Laravel.

Okay, but what in case we want to install some other version of Laravel application? Is it possible at all? Sure, we can add one extra argument to command with Laravel application version.

To install Laravel 5.3 with this method, we should use:

Mind that we haven’t used 5.3 here but 5.3.* . What’s the difference? If we use 5.3 in fact we tell to install 5.3.0 version what is probably fine at the moment but in future when Laravel application will be updated we would have installed outdated version out of the box and we don’t want it. So we should in this case choose 5.3.* to make sure we will have installed latest Laravel  5.3 application.

Installation of previous Laravel versions

Ok, so what about installing any other versions of Laravel? Well, it works exactly the same, we should again pass the version we are interested in.

So to install Laravel 5.2 we should use:

Free Exclusive Traffic Tips

About the Author: Dharmendra Yadav

Dharmendra Yadav is a PHP developer. Dharmendra Yadav background includes B.Tech in Computer Science and Engineering. Currently he is working with CORE PHP, CODEIGNITER, , Laravel, Opencart, JAVASCRIPT, JQUERY, AJAX, WORDPRESS, WEB API technologies , Smarty.

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *