Skip to content

Usage within OctoberCMS ? #14

@rajakhoury

Description

@rajakhoury

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions