Skip to main content

How To Install And Setup Laravel Latest Version On Windows 10 Using XAMPP

How to install Laravel on Windows using XAMPP

Laravel, one of the best PHP framework is getting more popular among developers all around the world. The Model-View-Controller architecture and blade templating engine made Laravel simple and powerful. Here we are going to discuss the steps of installation and setup of Laravel 5.7 on Windows 10 using XAMPP.

Installation

Follow the steps below to start installing Laravel 5.7 on Windows 10:

1. Install XAMPP

XAMPP is the most popular PHP development environment.XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use.
XAMPP can be easily installed using the link below.
https://www.apachefriends.org/download.html
Laravel 5.7 requires PHP >= 7.1.3. Download the latest version (7.3.3/PHP 7.3.3).
I have shown some screenshots of the installation steps below.

2. Start Apache and MySQL

So we have successfully installed Apache and MySQL. Now start the Apache and MySQL.

3. Install Composer

The composer is an application-level package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries. So we need to install composer before installing Laravel. Just follow the below URL and download the Composer-Setup.exe file.
https://getcomposer.org/download/
Image is loading...
I have shown some screenshots of the installation steps.
Image is loading...
Image is loading...

4. Install Laravel

Now its time to install Laravel on our system using composer. This can be done by running the below command in the Command prompt.
composer global require "laravel/installer"

5. Creating a New Application

After successful installation of Laravel, we can create a new app with the below command. AwesomeProject is the name of the project I want to create.
composer create-project --prefer-dist laravel/laravel AwesomeProject
Now, wait for some time to complete the creation process.

6. Create a Database

Now we need to create a database for our project in our MySQL server. This can be easily done using phpMyAdmin.
  • Open the link below. http://localhost/phpmyadmin  
  • Now Enter username and password(As a default, the username will be root password will be empty).
  • Click on the New tab
  • Enter a database name
Press Create
Image is loading...

7. Modify ENV File

We can see a .env file inside the root directory of our project. Add our database details in this file as below.
DB_DATABASE=(The database name you created earlier - awesome_project_db)
DB_USERNAME=(Your Mysql username. Default: root)
DB_PASSWORD=(Your Mysql password. As a default, blank)
Image is loading...

8. Migrate Database

Now we have to migrate the database to the local database we created earlier. This can be done using the command below.
php artisan migrate

9. Running the Application

Our application can be run using the command below.
php artisan serv
This will open up a new tab on our browser with the URL below. This is the home page of our Laravel application.
http://localhost:8000
Our app can also be run on another port using the command below.
php artisan serv --port=9000
This will open up our application in the port 9000
http://localhost:9000
TechoTip: We recommend using Visual Studio code as the source-code editor for working with Laravel projects.

----------------------------THANK YOU FOR SHARE----------------------------------
------------------------------------------------------------------------------------------------

Comments

Popular posts from this blog

Laravel Free Admin Panel UI and Code

Thanks for share  https://github.com/the-control-group/voyager V oyager - The Missing Laravel Admin Made with  ❤️  by  The Control Group Website & Documentation:  https://voyager.devdojo.com/ Video Tutorial Here:  https://voyager.devdojo.com/academy/ Join our Slack chat:  https://voyager-slack-invitation.herokuapp.com/ View the Voyager Cheat Sheet:  https://voyager-cheatsheet.ulties.com/ Laravel Admin & BREAD System (Browse, Read, Edit, Add, & Delete), supporting Laravel 6 and newer! Want to use Laravel 5? Use  Voyager 1.3 Installation Steps 1. Require the Package After creating your new Laravel application you can include the Voyager package with the following command: composer require tcg/voyager 2. Add the DB Credentials & APP_URL Next make sure to create a new database and add your database credentials to your .env file: DB_HOST=localhost DB_DATABASE=homestead DB_USERNAME=homestead DB...
Share Application - Any social  app  Facebook,Twitter,Instagram,Youtube,Google+....etc.                                      Pate Prashant    Android Code For share any application. Share code for Video,Image,Text.  share on (Twitter,Facebook,Instagram,Google+,Youtube) Some packeges of application name Application Name                                                Package Name Twitter                         ...