This is a straight-to-the-point tutorial on how to install and use the Laravel PHP framework with a local XAMPP server on your machine’s localhost. This post covers installing Laravel, but be sure to read other posts here in the Laravel Category to learn much more about the Laravel PHP framework.
- php version 5.3.7 or higher
- mcrypt module which comes with xampp and wampp by default so you shouldn’t have to do anything, but maybe check php info to make sure it’s there.
- Make sure openssl is enabled in your php.ini file
- make sure your httpd.conf file includes the httpd-vhosts.conf file in it.
- First, install composer by going to http://getcomposer.org/download/ and clicking on the link that reads: “Composer-Setup.exe” just under the “Windows INstaller” heading on that webpage.
- Secondly, install Laravel by going to http://laravel.com/ and click on the “Five Minute Quickstart” button to get a full set of instructions in case you need help, but I’ll give you the basic install steps next to keep it quick and easy for you.
- Go into your Xampp directory, open the htdocs folder and make a new directory for your Laravel project. You can name it simply “laravel” if you like to keep it easy to follow these instructions.
- Open your Command Prompt in Windows by clicking on start/All Programs/Accessories/Command Prompt and change your current working directory to that of the laravel folder you just created by using the cd command followed by the directory path.
- copy and paste the following text into your command prompt window:
composer create-project laravel/laravel your-project-name --prefer-dist
- before you hit enter, replace “your-project-name” with a project name of your choice such as “project1” as I did for this tutorial. Then press enter and Laravel will take several minutes to install usually.
That is all there is to a simple install on Xampp. Now you can go to your favorite browser and open up http://localhost/laravel/project1 and you should see the Laravel logo along with a quick message saying “You have arrived.” Now it’s time to learn how to use Laravel and find out about some of Laravel’s features.
Bundles are add-ons that you can download and plug into your Laravel installation for added functionality. Be sure to check out the bundles at http://bundles.laravel.com/