Laravel project structure organizes your code and files clearly. It helps you find and manage parts of your app easily.
Laravel project structure
laravel_project/ ├── app/ ├── bootstrap/ ├── config/ ├── database/ ├── public/ ├── resources/ ├── routes/ ├── storage/ ├── tests/ ├── vendor/ ├── artisan ├── composer.json ├── .env
app/ holds your main code like controllers and models.
public/ is the web root where index.php lives and assets are served.
app/ folder with main code parts: controllers handle requests, models work with data, and providers set up services.app/ ├── Http/ │ ├── Controllers/ │ └── Middleware/ ├── Models/ └── Providers/
routes/ folder contains files where you define URLs your app responds to, like web pages or API calls.routes/ ├── web.php ├── api.php └── console.php
resources/ holds templates for pages (views/), language files, and styles.resources/ ├── views/ ├── lang/ └── css/
This simple route in routes/web.php shows how Laravel uses the project structure. It listens for the home page URL and returns a welcome view from resources/views/welcome.blade.php.
<?php // File: routes/web.php use Illuminate\Support\Facades\Route; Route::get('/', function () { return view('welcome'); });
Keep your code inside app/ to follow Laravel's best practices.
Use public/ for files that browsers need to access directly, like images and scripts.
Configuration files in config/ let you change settings without touching code.
Laravel project structure organizes files into clear folders for code, views, routes, and configs.
This structure helps you build, maintain, and scale your app easily.
Understanding the folders lets you find and change parts of your app quickly.