API

Settings

{note} You're browsing the documentation for an old version of laravel-settings. Consider upgrading your project to v3. Check your version with the following command:

composer show rawilk/laravel-settings

/**
 * Set the context for the current operation.
 * Omit or set $context to null to remove context.
 *
 * @param \Rawilk\Settings\Support\Context|null $context
 * @return \Rawilk\Settings\Settings
 */
public function context(Context $context = null): self
/**
 * Remove a persisted setting from storage.
 *
 * @param string $key
 * @return void
 */
public function forget($key)
/**
 * Retrieve a setting from storage.
 *
 * @param string $key
 * @param mixed $default
 * @return mixed
 */
public function get(string $key, $default = null)
/**
 * Determine if a setting has been persisted to storage.
 *
 * @param string $key
 * @return bool
 */
public function has($key): bool
/**
 * Persist a setting to storage.
 * Updates already persisted settings.
 *
 * @param string $key
 * @param mixed $value
 * @return void
 */
public function set(string $key, $value = null)
/**
 * Determine if a setting is set to a false value.
 * Returns true if the value is false, '0', or 0.
 *
 * @param string $key
 * @param bool|int|string $default
 * @return bool
 */
public function isFalse(string $key, $default = false): bool
/**
 * Determine if a setting is set to a truthy value.
 * Returns true if the value is true, '1', or 1.
 *
 * @param string $key
 * @param bool|int|string $default
 * @return bool
 */
public function isTrue(string $key, $default = true): bool
Previous
Sensitive Data
Caught a mistake? Suggest an edit on GitHub