Basic Usage

Basic Usage

You can interact with settings via the Settings facade, or by using the settings() helper function, which returns an instance of Rawilk\Settings\Settings.

// Create a new setting
Settings::set('foo', 'bar');

// Update an existing setting
Settings::set('foo', 'updated value');
Settings::get('foo');

// Retrieve a non-persisted setting
Settings::get('not persisted', 'my default'); // 'my default'
Settings::has('foo');
Settings::forget('foo');
Settings::set('app.debug', true);

Settings::isTrue('app.debug'); // true
Settings::isFalse('app.debug'); // false

Settings::set('app.debug', false);
Settings::isFalse('app.debug'); // true
Previous
Changelog
Caught a mistake? Suggest an edit on GitHub