Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom file name config information #527

Closed
mkinternet opened this issue Nov 8, 2021 · 1 comment
Closed

Add custom file name config information #527

mkinternet opened this issue Nov 8, 2021 · 1 comment

Comments

@mkinternet
Copy link

https://github.com/octobercms/docs/blob/develop/1.x/plugin/settings.md

/plugins/author/myplugin/config/custom.php
becomes
Config::get('Acme.Demo::custom.maxItems');

@daftspunk
Copy link
Member

Thanks. Added this to docs


You may also use a different filename for the configuration file and this affects the key name. For example, a configuration file named custom.php will prefix the key name with custom, using the following format: Acme.Demo::custom.maxItems. Example configuration file plugins/acme/demo/config/custom.php.

$maxItems = Config::get('acme.demo::custom.maxItems', 50);

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

No branches or pull requests

2 participants