Directory structure

Hi just wondered how it is better to organize directories for my project. I understand that there are not predefined rules but I would like to get some advice on that.

Let's say I have service classes or a class that stores static arrays (e.g. country, province list). While I understand that it can be stored in any folder I would like to get some advice on that.

Thanks in advance



2.2k

I've always used two separate things for this kind of stuff:

  • app/config holds configuration files that are used for the app. I use YAML for all static configuration that I don't want to keep in the database, usually registering them as services in the bootstrap.
  • app/utilities is where I put helper classes for my app. It has a dedicated namespace ("Utilities") which makes all of them easy to use.