This short tutorial is based on my own installation of Laravel 5 on XAMPP that is running on Windows 7.
In this Laravel 5 tutorial, you will need:
- Composer – click here for installation instructions
- command prompt
- Internet connection
There have been major changes in the following: New Folder Structure, Contracts, Route Cache, Route Middleware, Controller Method Injection, Authentication Scaffolding, Event Objects, Commands / Queueing, Database Queue, Laravel Scheduler, Tinker / Psysh, DotEnv, Laravel Elixir, Laravel Socialite, Flysystem Integration, Form Requests, Simple Controller Request Validation, New Generators, Configuration Cache, Symfony VarDumper.
To learn more about the Laravel 5.0 update, read about it here.
How to install Laravel 5 in Windows with XAMPP
In command prompt, navigate to your XAMPP’s htdocs folder, e.g.,
Run the following command, replacing <YOUR_FOLDER_NAME> with a folder name of your choice:
composer create-project laravel/laravel <YOUR_FOLDER_NAME> 5.0 --prefer-dist
This will download Laravel 5 on your machine. For this tutorial, let’s assume that you installed Laravel 5 in this path:
C:/xampp/htdocs/laravel5, so your command will be:
composer create-project laravel/laravel laravel5 5.0 --prefer-dist
When installation is finished, run the following command:
This will download and install dependencies, as written in the composer.json in your laravel folder.
When your composer install has finished, you should now be able to view the Laravel 5.0 welcome page.
Start your Apache and MySQL. You might expect to find the site at http://localhost/laravel5, but nope, you are missing a segment in the URL. Go to http://localhost/laravel5/public/ to see this neat welcome page:
/public in the URL doesn’t make the prettiest structure, and there’s something we can do to remove that. Find the
server.php file in the root folder of your Laravel installation, and rename it into
index.php. Then go to the
/public folder, and copy the
.htaccess file. Paste the
.htaccess file into the root folder of Laravel.
Now, try to access http://localhost/laravel5. That should be accessible now.
Start building amazing apps with your Laravel 5.0 installation! 🙂