phalcon mutiple config why not use one dbconfig

phalcon mutiple config why use one dbconfig .instead of one in frontend ,one in backend



4.2k
edited Dec '15

I'm right there with you so I created a single config file in frontend/config and created a symlink in every module's config folder linking to the frontend file.

Create this as your master config:

/path/to/project/root/apps/frontend/config/config.php

the create a symlink for backend:

ln -s /path/to/project/root/apps/frontend/config/config.php /path/to/project/root/apps/backend/config/config.php



6.3k
edited Dec '15

Hmm, isn't it an option for you to create project level config in

root/config/config.php?

As in this example https://github.com/phalcon/mvc/tree/master/multiple-volt

Then add it to di as e.g. globalconfig and access from any module you want ($this->globalConfig). Optionally you may have separate config for each module in root/apps/module/config/config.php in the same time and use it instead of global for module if it's available, or merge it with global config.