March 26, 2017

How to Install Laravel framework on Windows with XAMPP

In this post, I will explain how to install Laravel framework on Windows, with XAMPP as PHP development environment.

First you have to install XAMPP you can find here: XAMPP Installer

You can install Laravel framework by using Composer. You can download composer from https://getcomposer.org/download/. Composer setup will ask for PHP installation path, in my XAMPP installation it is:

D:\xampp\php\php.exe

You can verify if composer is correctly installed, by executing the command composer in command prompt. If you get an error message, it means it is not added in the Environment Variables, so you have to add the composer.exe folder path in Environment Variables.

composer console

In-case if you have already have installed composer, its better to update it-self to the latest version before moving forward. Run the following command to update composer it-self.

composer self-update

Here we finished installing composer, and now we have to install Laravel. Move to a web-accessible folder, the folder where we usually place all web projects. In my XAMPP installation it is D:\xampp\htdocs

Now go to command prompt, move to the above mentioned web-accessible folder, and execute following command:

composer create-project --prefer-dist laravel/laravel myweb

composer console - install laravel

It will install Laravel framework to a folder named myweb inside the htdocs folder, you can use your own project name in place of myweb (last part in the above command). Then composer will download and configure all the required dependencies, and finally your Laravel basic application is now ready.

If you have PHP installed locally with XAMPP and you may use PHP's built-in development server to serve your application. To make our development envrionment to server this website we have to use the artisan command. This command will start a development server.

You can try access it by localhost path:

http://localhost:8000

You should see the following home page for Laravel in your browser.

laravel welcome page

And it's done. We have successfully installed Laravel framework on our machine.

References

https://laravel.com/docs

4 comments:

  1. Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great information. We are technology/news/smartphone company, If you want to read such useful news then, Visit us: https://techmie.com/

    ReplyDelete
  2. There is so many PHP frameworks but Laravel is considered the best framework for web development.
    Here are a few reason Why Laravel is the Top PHP Framework
    Hire Laravel expert for your business.

    ReplyDelete

  3. Hi,
    Thanks for sharing this.
    Being an expert in Laravel Website Development, I believe Laravel is many developers' 1st choice because Laravel website development simplifies most project tasks, saving time and efforts. It is a powerful tool that meets specific needs and constructs an exceptional CMS or Web application.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete