Kritim Yantra
May 20, 2025
Starting your Laravel journey but confused about where to begin?
You’ve probably heard terms like XAMPP, Composer, and Laravel, but setting them up can feel overwhelming—especially if you're new to PHP development.
Don’t worry! This guide will walk you through every step with clarity, screenshots (optional), and code examples to help you set up your Laravel development environment in no time. 💻✨
Tool | Purpose |
---|---|
XAMPP | Provides PHP, MySQL, and Apache – your local server stack |
Composer | Dependency manager for PHP (like npm for Node.js) |
Laravel | The PHP framework for building web apps |
C:\xampp
)✅ Great! Your local server is up and running.
C:\xampp\php\php.exe
)Open Command Prompt or Terminal and run:
composer -v
You should see version details. If yes — ✅ Composer is ready!
Now let’s bring in Laravel!
We’ll create your first Laravel project inside XAMPP’s htdocs
folder:
cd C:\xampp\htdocs
Use this Composer command:
composer create-project laravel/laravel laravelapp
This will:
routes/
, app/
, resources/
Wait for it to finish... ⏳
Once done, you’ll see a new folder laravelapp
inside htdocs
.
Move into your project directory:
cd laravelapp
Then run:
php artisan serve
You’ll see:
Starting Laravel development server: http://127.0.0.1:8000
🖥️ Open a browser and go to:
http://127.0.0.1:8000
🎉 Boom! You’ve successfully installed and launched your first Laravel app!
If you want to connect Laravel to MySQL:
laravel_db
).env
file in your Laravel app and update:DB_DATABASE=laravel_db
DB_USERNAME=root
DB_PASSWORD=
That’s it — your Laravel app is now connected to MySQL! 🧠
Step | Action |
---|---|
1️⃣ | Installed XAMPP for PHP, Apache & MySQL |
2️⃣ | Installed Composer (dependency manager) |
3️⃣ | Created Laravel project using Composer |
4️⃣ | Ran Laravel using php artisan serve |
5️⃣ | (Optional) Connected Laravel to MySQL |
php artisan serve
inside your Laravel folderCtrl + C
in terminalSetting up Laravel can be super simple when done step-by-step. With XAMPP, Composer, and Laravel installed, you now have a complete PHP development environment ready to go!
You’re no longer just a beginner — you’re ready to build your first Laravel project! 🔥
No comments yet. Be the first to comment!
Please log in to post a comment:
Sign in with Google