LaravelLaravel14 min read

Installing Laravel and Understanding Project Structure

Install Laravel using Composer and understand the purpose of each main folder in a Laravel project.

Michael Turner
November 11, 2025
2.7k62

Let’s start by installing Laravel and understanding how a Laravel project is organized.

Prerequisites

Make sure you have:

  • PHP 8.1 or higher
  • Composer installed
  • A database (MySQL/PostgreSQL)
  • Basic command line knowledge

Create a new Laravel project

composer create-project laravel/laravel my-app
cd my-app
php artisan serve

Open in browser:
http://localhost:8000

You should see the Laravel welcome page.

Important folders

my-app/
  app/        → Controllers, Models, core logic
  routes/     → All route definitions
  database/   → Migrations, seeders, factories
  resources/  → Views, CSS, JS
  public/     → Public entry point
  config/     → Configuration files
  storage/    → Logs, cache, uploads

Request lifecycle overview

flowchart LR
  A[Request] --> B[public/index.php]
  B --> C[Kernel]
  C --> D[Router]
  D --> E[Controller]
  E --> F[Response]

This flow helps you understand where your code executes.

In the next tutorial, we will configure environment variables and connect Laravel to a database.

#Laravel#Setup#Beginner