PHPackages                             larapages/settings - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. larapages/settings

Abandoned → [nickdekruijk/settings](/?search=nickdekruijk%2Fsettings)Library[Utility &amp; Helpers](/categories/utility)

larapages/settings
==================

A basic cache enabled Setting model, migration and helper for your Laravel project

1.2.0(4y ago)156MITPHPPHP &gt;=7.0.0

Since Jan 20Pushed 4y ago1 watchersCompare

[ Source](https://github.com/nickdekruijk/settings)[ Packagist](https://packagist.org/packages/larapages/settings)[ Docs](http://www.nickdekruijk.nl/packages/settings)[ RSS](/packages/larapages-settings/feed)WikiDiscussions master Synced today

READMEChangelog (10)DependenciesVersions (13)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/1d204ebe1ab3a1161fae9df6b719ab454420ce2e4bc078dad3d3ba4325d9d0b0/68747470733a2f2f706f7365722e707567782e6f72672f6e69636b64656b7275696a6b2f73657474696e67732f762f737461626c65)](https://packagist.org/packages/nickdekruijk/settings)[![Latest Unstable Version](https://camo.githubusercontent.com/de5e82a4237eb4b9a0e149dc16e9baa0dc93d8852241d1db899ec8cdccd14447/68747470733a2f2f706f7365722e707567782e6f72672f6e69636b64656b7275696a6b2f73657474696e67732f762f756e737461626c65)](https://packagist.org/packages/nickdekruijk/settings)[![Monthly Downloads](https://camo.githubusercontent.com/65eb61dd97e00d1dde3e50deb20ca0e5962725b23215cd0e75c19bc1af6369fb/68747470733a2f2f706f7365722e707567782e6f72672f6e69636b64656b7275696a6b2f73657474696e67732f642f6d6f6e74686c79)](https://packagist.org/packages/nickdekruijk/settings)[![Total Downloads](https://camo.githubusercontent.com/54eb849b1705bff05e8b1b4685a68c01e7c1e6d4963766b8d7d75851c4b263ce/68747470733a2f2f706f7365722e707567782e6f72672f6e69636b64656b7275696a6b2f73657474696e67732f646f776e6c6f616473)](https://packagist.org/packages/nickdekruijk/settings)[![License](https://camo.githubusercontent.com/b031e11a04c8386c2aa9034d90645ae2cf96ac8b000e4182be0e4b12d574b028/68747470733a2f2f706f7365722e707567782e6f72672f6e69636b64656b7275696a6b2f73657474696e67732f6c6963656e7365)](https://packagist.org/packages/nickdekruijk/settings)

Settings
========

[](#settings)

A basic cache enabled Setting model, migration and helper for your Laravel project. It uses a database to store settings for your application. When retrieving settings they are stored in the Laravel cache to prevent unnecessary database queries.

Installation
------------

[](#installation)

To install the package use

`composer require nickdekruijk/settings`

Configuration
-------------

[](#configuration)

If you don't like the default configuration options publish the config file and change the `settings.php` file in your Laravel `app/config` folder.

`php artisan vendor:publish --tag=config --provider="NickDeKruijk\Settings\ServiceProvider"`

Usage
-----

[](#usage)

### Retrieving settings

[](#retrieving-settings)

If the setting table is created (run `php artisan migrate`) and you added your first setting you can use `setting('key');` from anywhere in your application. The setting helper also accepts a default value in case the key isn't present in the database like `setting('key', 'defaultvalue');`. You can call `NickDeKruijk\Settings\Setting::get($key)` too.

### Retrieving a setting as array

[](#retrieving-a-setting-as-array)

When you have a setting with a value like this:

```
facebook = https://www.facebook.com/
twitter = https://twitter.com/
instagram = https://instagram.com/

```

You can have it returned as an array using `setting('key', null, '=')`which will return this array

```
[
  "facebook" => "https://www.facebook.com/",
  "twitter" => "https://twitter.com/",
  "instagram" => "https://instagram.com/"
]
```

### Adding settings

[](#adding-settings)

To update of create a new setting you use the setting helper with an array like `setting(['key' => 'value']);` or call `NickDeKruijk\Settings\Setting::set([$key => $value]);`. To include description you can use `setting(['key' => ['value' => 1, 'description' => 'string']]);`. The setting will be added to the database or updated if it already exists. The Setting Model also triggers an event on updated and created to store the new value in the cache.

License
-------

[](#license)

Settings is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~137 days

Recently: every ~208 days

Total

12

Last Release

1572d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b01fc7c2c39bbe8f87b4afa70ffe1cf2bb787310e1d22fcfed6ae527d4573bb?d=identicon)[nickdekruijk](/maintainers/nickdekruijk)

---

Top Contributors

[![nickdekruijk](https://avatars.githubusercontent.com/u/607302?v=4)](https://github.com/nickdekruijk "nickdekruijk (23 commits)")

---

Tags

phplaravelSettingssetting

### Embed Badge

![Health badge](/badges/larapages-settings/health.svg)

```
[![Health](https://phpackages.com/badges/larapages-settings/health.svg)](https://phpackages.com/packages/larapages-settings)
```

###  Alternatives

[tomatophp/filament-settings-hub

Manage your Filament app settings with GUI and helpers

5851.9k9](/packages/tomatophp-filament-settings-hub)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
