Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.

Folder Structure

Guo Yunhe edited this page Jun 25, 2016 · 1 revision

Folder and File Naming

Singular or Plural

  1. When the name means this is a collection of items, use plural.
  2. When the name means this is a type of items, use singular.
  3. When the name is a abbreviation, use singular.

Examples: resources/assets/img/icon/300x300.svg

resources, assets are collections of items, use plural. img is a collection but is abbreviation, so use singular. icon is type of items, so use singular.

PascalCase or snake_case or kebab-case

  1. Top level folders use snake_case. Single lowercase word is better, like "database", "resources".
  2. For PHP classes and namespaces in app folder, folders and class files are all PascalCase.
  3. For files and folders in resources folder, use kebab-case.
  4. Other folders may have a readme.