laravel-settings
API
Settings
On this page
{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`
context
/**
* 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
forget
/**
* Remove a persisted setting from storage.
*
* @param string $key
* @return void
*/
public function forget($key)
get
/**
* Retrieve a setting from storage.
*
* @param string $key
* @param mixed $default
* @return mixed
*/
public function get(string $key, $default = null)
has
/**
* Determine if a setting has been persisted to storage.
*
* @param string $key
* @return bool
*/
public function has($key): bool
set
/**
* Persist a setting to storage.
* Updates already persisted settings.
*
* @param string $key
* @param mixed $value
* @return void
*/
public function set(string $key, $value = null)
isFalse
/**
* 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
isTrue
/**
* 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