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

Usage within OctoberCMS ? #14

Open
rajakhoury opened this issue Apr 19, 2017 · 0 comments
Open

Usage within OctoberCMS ? #14

rajakhoury opened this issue Apr 19, 2017 · 0 comments

Comments

@rajakhoury
Copy link

Can someone help me out getting this to work within an octobercms component ?

Use Config;

Config::write('acme.demo::url', 'http://octobercms.com');

Error :

Call to undefined method October\Rain\Config\Repository::write()

Looking at the documentation there's a public method toFile()

use October\Rain\Config\ConfigWriter;
(new ConfigWriter)->toFile('acme.demo::url', 'http://octobercms.com');

Error :

file_get_contents(acme.demo::url): failed to open stream: Invalid argument

Note that my plugin : Acme\Demo has a Config Directory and a config.php file.

Anyone?

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

No branches or pull requests

1 participant