{note} You're browsing the documentation for an old version of laravel-settings. Consider upgrading your project to v2.

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.

Setting a value

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

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

Retrieving a value


// Retrieve a non-persisted setting
Settings::get('not persisted', 'my default'); // 'my default'

Check if a setting exists


Remove a setting from storage


Boolean settings

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 Topic


Next Topic →

Contextual Settings

Caught a mistake? Suggest an edit on Github