Laravel Directory Structure

Directory is term used for folders in approximately all GUI operating systems. So that directory structure refers to the hierarchy of folder under some root folder. In Laravel this directory structure is different in some versions. Some of the Laravel versions also comes with some change in directory structure. In Laravel this directory structure also helpful to define MVC framework.

Directories of Laravel at Root:

The most frequently used folders are placed at root directory. These folders also contain other folders relevant to its parent folder.

  • App
  • Bootstrap
  • Config
  • Database
  • Public
  • Resources
  • Routes
  • Storage
  • Tests
  • Vendor

App Directory:

All models and controllers are placed in app folder. Models are saved in app root directory, while controllers are placed in http/controller folder.

Resoures Directory:

All blade files are stored in resources/views folder. This directory also contain other sub-directories.

Routes Directory:

All API and web routing files are placed in routes directory.

Public Directory:

All assets are placed in public directory, such as js, css and other resource (images).

Storage Directory:

Laravel use blade templating engine for rendering php script. All compiled blade files/resources are placed in storage folder.

Login to TRACK of Comments.