Before you can start building with Laravel, you need to Setting up Laravel the development environment on your local machine. In this tutorial, we'll show you how to set up Laravel on a Windows 10 machine step-by-step. By the end of this Installing Laravel with XAMPP and Composer tutorial, you'll have a fully functional Laravel development environment running on your Windows 10 machine, ready for building your first Laravel application. Let's get started!
Install XAMPP
Download the XAMPP installer from the official website: https://www.apachefriends.org/index.html
Run the installer and follow the instructions to complete the installation process.
Once the installation is complete, start the XAMPP control panel and make sure the Apache and MySQL services are running.
Install Composer
Download the Composer installer from the official website: https://getcomposer.org/download/
Run the installer and follow the instructions to complete the installation process.
Once the installation is complete, open your terminal or command prompt and run the following command to verify that Composer is installed: composer --version
Install Laravel
Open your terminal or command prompt and navigate to the htdocs directory in your XAMPP installation: cd /path/to/xampp/htdocs
Run the following command to create a new Laravel project: composer create-project --prefer-dist laravel/laravel project-name
Replace "project-name" with the name you want to give to your new Laravel project in my case I used "OpenBasket".
Wait for the installation to complete. This may take a few minutes, depending on your internet speed and the specifications of your system.
Launch the development server
Once the installation is complete, navigate to the project directory using the cd command in your terminal: cd project-name
Next, launch the development server by running the following command:
php artisan serve
This will start a local development server at http://localhost:8000, where you can preview your Laravel application.
And that's it! You have now installed XAMPP, Composer, and Laravel, and launched a local development server to preview your Laravel application. From here, you can start building your application by creating controllers, models, views, and routes using the Laravel framework. Good luck!
0 Comments