Private Folders

Private folders can be created by prefixing a folder with an underscore: _folderName

This indicates the folder is a private implementation detail and should not be considered by the routing system, thereby opting the folder and all its subfolders out of routing.

private-route

Since files in the app directory can be safely colocated by default, private folders are not required for colocation. However, they can be useful for:

  • Separating UI logic from routing logic.
  • Consistently organizing internal files across a project and the Prisma PHP ecosystem.
  • Sorting and grouping files in code editors.
  • Avoiding potential naming conflicts with future Prisma PHP file conventions.