Skip to content

Instantly share code, notes, and snippets.

@reinink
Created April 11, 2016 10:11
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save reinink/504a9654c4348dbc0dc81ff4313fb588 to your computer and use it in GitHub Desktop.
Save reinink/504a9654c4348dbc0dc81ff4313fb588 to your computer and use it in GitHub Desktop.
How do you typically organize your classes?

By type

  • /Controllers
  • /Events
  • /Models

By topic

  • /Comments
  • /Posts
  • /Users

By topic, then type

  • /Comments
    • /Controllers
    • /Events
    • /Models
  • /Posts
    • /Controllers
    • /Events
    • /Models
  • /Users
    • /Controllers
    • /Events
    • /Models

Mixed

  • /Comments
  • /Controllers
  • /Events
  • /Models
  • /Posts
  • /Users
@stefanbauer
Copy link

Even this is a really, really old gist, I'd still just wanted to share my thoughts on it, which I wrote a blog post about it: https://stefanbauer.me/articles/an-alternative-way-to-organize-the-laravel-directory-structure - I think it's basically what @frankdejonge is doing. Do it for several years now and still happy with it – at least if we're talking about larger projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment