devnotes.

Directory Structure

Understanding a Laravel project's folder layout makes navigating any Laravel codebase easy, since the structure is consistent across every app.

  • app/ — Your application's core code: Models, Http/Controllers, Http/Middleware, Providers, etc.
  • bootstrap/ — Framework bootstrap files and the cached files Laravel generates for performance (bootstrap/cache).
  • config/ — All configuration files (database.php, mail.php, app.php, etc.).
  • database/ — Migrations, model factories, and seeders.
  • public/ — The web server's document root; contains index.php, the entry point for every request, plus compiled assets.
  • resources/ — Views (Blade templates), raw CSS/JS, and language files.
  • routes/ — Route definitions, split into web.php, api.php, console.php, and channels.php.
  • storage/ — Compiled Blade templates, file-based sessions, caches, logs, and user-uploaded files.
  • tests/ — Feature and Unit test classes (PHPUnit or Pest).
  • vendor/ — Composer dependencies (never edited directly, never committed).

Most day-to-day work happens in app/, routes/, resources/views/, and database/. Since Laravel 11, the skeleton was slimmed down considerably — a single AppServiceProvider, a streamlined bootstrap/app.php for registering middleware and exception handling, and no default Http/Kernel.php or Console/Kernel.php — and this leaner structure carries forward into Laravel 12 and 13.

Laravel Directory Structure Explained | DevNotes