laravel-config-writer icon indicating copy to clipboard operation
laravel-config-writer copied to clipboard

Usage within OctoberCMS ?

Open rajakhoury opened this issue 7 years ago • 0 comments

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?

rajakhoury avatar Apr 19 '17 18:04 rajakhoury