Closed dominikfoeger closed 2 years ago
Hey @dominikradl! Thanks for your pull request, we haven't thought about this issue before. I have chosen your first solution as it would be quite troublesome to other users that the configPath would suddenly change on all their instances. You can use the config variable cookie-byte.config_dirname
now to specify the storage_path('storage/statamic/addons')
.
Problem:
base_path()
returns a path relative to the applications root directory. Without any customizations (such as custom stache paths in Statamic) this will be overwritten on every deploy in environments where every release has it's own directory.Solution: Either extend the configuration to be able to alter the storage path for the addon or use
storage_path()
instead ofbase_path()
, because/storage
has to be persisted between releases anyways. In my experience/storage/statamic/addons/[ADDON]
is the de facto standard for storing addon data.