Here’s a clear Basic Laravel Project Structure Overview so you’ll know what every folder is for when you open your project.
When you open your Laravel project folder, here’s what you’ll see:
myapp/
├── app/
├── bootstrap/
├── config/
├── database/
├── public/
├── resources/
├── routes/
├── storage/
├── tests/
├── vendor/
├── .env
├── artisan
└── composer.json
Let’s quickly break each part down 👇
This is the core of your application — it contains:
– You’ll spend a lot of time here.
Example:
app/
├── Console/
├── Exceptions/
├── Http/
│ ├── Controllers/
│ ├── Middleware/
├── Models/
└── Providers/
Contains files for starting the Laravel framework (bootstrapping).
The app.php
file initializes your app.
✅ You usually won’t edit this folder.
Contains all configuration files (like app.php
, database.php
, mail.php
, etc.)
Whenever you want to configure Laravel settings — this is where you go.
Example:
config/app.php
config/database.php
config/mail.php
Handles everything related to the database.
This is the web server’s document root (the only folder accessible to browsers).
It contains:
— When you deploy Laravel, you point your server to public/
(not the project root).
Contains frontend resources:
Example:
resources/
├── views/
│ └── welcome.blade.php
├── lang/
│ └── en/
└── js/
Defines application routes.
Example quick route (in web.php
):
Route::get('/', function () {
return view('welcome');
});
Handles app-generated files:
— You’ll often need to set write permissions on this folder.
Contains automated tests (PHPUnit).
Laravel encourages TDD (Test Driven Development).
Example:
tests/
├── Feature/
└── Unit/
Contains all Composer dependencies.
(Laravel framework code and other packages live here.)
✅ You don’t edit this folder manually.
.env
— your environment variables file (DB settings, app key, etc.)artisan
— Laravel’s CLI toolphp artisan migrate
composer.json
— Composer dependencies + scripts
Folder / File | What it’s for |
---|---|
app/ | Business logic (models, controllers) |
bootstrap/ | App bootstrapping (startup) |
config/ | All configuration |
database/ | Migrations, seeders, factories |
public/ | Public web root (index.php, assets) |
resources/ | Views, languages, frontend assets |
routes/ | App routes |
storage/ | Logs, uploads, cache |
tests/ | Automated tests |
vendor/ | Composer dependencies |
.env | Environment variables |
artisan | CLI tool |
— You’re ready to start coding confidently inside your Laravel project.