# π Quick Guide to Laravel Directory Structure
When you first open a fresh Laravel project, the number of folders might feel overwhelming. Hereβs a quick guide to help you understand the **Laravel directory structure** and what each folder is for.
---
## π Important Folders in Laravel
### 1. **app/**
Contains the core of your applicationβs logic.
- `Http/` β Controllers, Middleware, Requests
- `Models/` β Eloquent models (database tables)
- `Console/` β Custom Artisan commands
π This is where most of your coding happens.
---
### 2. **bootstrap/**
Holds files for bootstrapping the framework, including `app.php` which starts Laravel. It also caches configuration for better performance.
---
### 3. **config/**
Contains configuration files (database, mail, cache, services, etc). These often pull values from `.env`.
---
### 4. **database/**
Includes migrations, seeders, and factories.
- `migrations/` β Create or modify tables
- `seeders/` β Populate tables with test data
- `factories/` β Generate fake data
---
### 5. **public/**
The entry point of your application. It has `index.php`, which loads everything. Also stores public assets like CSS, JS, and images.
---
### 6. **resources/**
Contains views, raw assets, and language files.
- `views/` β Blade templates
- `lang/` β Localization files
- `css/js/` β Frontend assets (compiled by Laravel Mix/Vite)
---
### 7. **routes/**
Defines all application routes.
- `web.php` β Routes for web UI
- `api.php` β Routes for APIs
- `console.php` β Artisan commands
- `channels.php` β Event broadcasting
---
### 8. **storage/**
Used for app-generated files.
- `logs/` β Error logs
- `framework/` β Sessions, cache, views
- `app/` β User-uploaded files
---
### 9. **tests/**
Contains test cases for unit and feature testing. Run tests with:
```bash
php artisan test
### 10. **vendor/**
Contains all Composer dependencies (Laravel itself lives here). You usually donβt touch this folder.
