📦 Installing Laravel via Composer
Composer is the official way to install Laravel and manage its dependencies. Let’s walk through the installation step by step.
🧰 Step 1: Install Composer
Make sure Composer is installed globally on your system. To check:
composer -V
If not installed, download it from getcomposer.org.
🛠️ Step 2: Create a New Laravel Project
Run the following command in your terminal to create a Laravel app named my-app:
composer create-project laravel/laravel my-app
This will:
- Download the Laravel framework
- Set up default folders and files
- Install all required dependencies
🚀 Step 3: Serve the Application
Move into your new Laravel directory:
cd my-app
Then start the built-in development server:
php artisan serve
Open your browser and go to:
http://localhost:8000📁 What You Get
Inside the Laravel folder:
app/– Application logic (controllers, models)routes/– Route definitionsresources/– Blade templates & assets.env– Environment configuration
.env file and run migrations to prepare your tables.


