How to Install and Make First Laravel App on Windows
I use Wamp on my Windows box for developing PHP based apps, I recently installed Laravel on my Windows box to test how to framework works and performs common tasks related to web development. I would keep posting good stuff I learned about Laravel in easy to follow steps for new developers of Laravel like me.
The Steps I followed are following:
The addressbook folder contents looks like this:
The mail folder where our major web applications components would be located is "app", its default structure is following:
The Steps I followed are following:
- Laravel used Composer for dependency management, so first I installed Composer for Windows. Like to download is: https://getcomposer.org/Composer-Setup.exe
During the Composer installation, it would ask for the location of PHP.exe, so make sure you have installed PHP on your system before you install Composer. - It would download a few things from internet, so wait with patience. It uses SSL, so make sure SSL module is enabled in your php.ini file, just remove the ";" before the like: "extension=php_openssl.dll". The php.ini file is located at your php's installation home folder.
The installation would also set the composer location into you windows path environmental variable, so that you can use composer command from Command Prompt. - Download the Laravel Installer using Composer. On your Command Prompt, enter:
composer global require "laravel/installer=~1.1"
It would install all dependencies e.g. Symfony Console, Guzzlehttp Guzzle, Laravel Intaller, etc. - Add your ~/.composer/vendor/bin path into Path environmental variable, so that Windows Command Prompt could identify laravel command that would be used later to install Laravel and doing other tasks. In my case the path where its located is:
C:\Users\UserName\AppData\Roaming\Composer\vendor\bin
so I added it into my Path environmental variable. Must restart your Shell or Command-Prompt so that updated Path variables is loaded. - Its time to create our first Laravel applications. For it, we need to install the Laravel itself. Afte you have done the above steps, its very simple. Issue following command at Command Prompt:
laravel new app-name
make sure your current directory is where you need your project to be created. In my case, I got following output by running the laravel new command:
D:\OtherData\LaravelApps>laravel new addressbook
Crafting application...
Application ready! Build something amazing.
The addressbook folder contents looks like this:
The mail folder where our major web applications components would be located is "app", its default structure is following:
I moved the addressbook folder into wamp/www/, and access the URL:
http://localhost/addressbook/public/, here is how it looks like:
This is a good tutorial for laravel beginners like me. Keep it up.
ReplyDeleteGreat work
ReplyDeleteThank you. Solved my PATH issue on Windows.
ReplyDeleteGood work..Solve my problem
ReplyDeleteThank you. It's detail.
ReplyDeleteFor ones who like speed. Check this out
https://innopy.wordpress.com/2015/02/07/laravel-windows/
Laragon sounds me an overhead when one is already using WAMP or XAMPP or standalone installation of all softwares.
ReplyDeleteYes. You're right. Laragon is same with WAMP ( or XAMPP). Just a tool to make life easier.
DeleteThanks.
ReplyDeleteHe used a best way to install this applications on windows. Thanks to share these important steps which is useful for everyone. digital marketing agency usa
ReplyDeletethank you after all errrors fixed from this post.
ReplyDeleteBut crafting takes long tine for me...
Thank you, you solved my problem !
ReplyDeleteYou shared very informative post. i like this post. Thanks for sharing.
ReplyDeleteMagento Website Development Company
Wonderful post, I like your blog.
ReplyDeletehtml training in chennai
Nice blog. I like it. Thanks for sharing.
ReplyDeleteMagento eCommerce Development
very nice blogs!!! i have to learning for lot of information for this sites...Sharing for wonderful information.Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
ReplyDeleteWeb Designing Company Bangalore
Superb Article
ReplyDeleteI faced so many hurdles when I did it first time. But now, I am availing of the benefits of this app in my Windows. Buy Digital Products
ReplyDelete