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.
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
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.
And it's done. We have successfully installed Laravel framework on our machine.
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/
ReplyDeleteThere is so many PHP frameworks but Laravel is considered the best framework for web development.
ReplyDeleteHere are a few reason Why Laravel is the Top PHP Framework
Hire Laravel expert for your business.
ReplyDeleteHi,
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.
This comment has been removed by the author.
ReplyDelete