PHPackages                             vluzrmos/eloquent-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. [Database &amp; ORM](/categories/database)
4. /
5. vluzrmos/eloquent-settings

ActiveLibrary[Database &amp; ORM](/categories/database)

vluzrmos/eloquent-settings
==========================

An Eloquent Settings Repository

v1.0.0(7y ago)3611MITPHPPHP &gt;=7.0.0

Since Dec 29Pushed 7y ago2 watchersCompare

[ Source](https://github.com/vluzrmos/eloquent-settings)[ Packagist](https://packagist.org/packages/vluzrmos/eloquent-settings)[ RSS](/packages/vluzrmos-eloquent-settings/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Eloquent Settings Repository
============================

[](#eloquent-settings-repository)

A package to store settings of your application on database.

Installation
============

[](#installation)

```
composer require vluzrmos/eloquent-settings

```

Configuration
=============

[](#configuration)

First, you have to publish the configs and migrations:

```
php artisan vendor:publish --provider=Vluzrmos\EloquentSettings\Providers\EloquentSettingsServiceProvider

```

Second, run the migrations:

```
php artisan migrate

```

Usage
=====

[](#usage)

You can use the dependency injection or the `setting` helper:

```
use \Vluzrmos\EloquentSettings\Setting;

class YourInjectableClass {

   protected $settings;

   public function __construct (Setting $settings) {
       $this->settings = $settings;
   }

   public function theMethod() {
       $option = $this->settings->get('my.awesome.option', 'default-value');
   }
}

```

It's more easy to use the `setting` helper:

```
// Getter
$option = setting('my.awesome.option', 'default-value');
//or
$option = setting()->get('my.awesome.option', 'default-value');

// Setter
setting()->set('my.awesome.option', 'That is Awesome!');

setting()->save(); //remember, without this the settings will not be stored on database
```

Setting API
===========

[](#setting-api)

**get(string key, mixed default=null) : mixed** - Get a setting on database, if doens't exists it will use the default value.

**set(string|array key, mixed value=null) : void** - Set a value or array of key=&gt;values to the settings.

**forget(string key) : void** - Clear an value of the settings.

**has(string key) : bool** - Check if settings has a given key.

**all() : array** - Get an array of all settings.

**except(string|array keys ...) : array** - Get settings which doesn't match with that given keys.

**only(string|array keys ...) : array** - Get settings which match with that given keys.

**save() : void** - **IMPORTANT!** Store settings on the database.

**update(string|array keys, mixed value=null) : void** - Sets and saves one or more settings.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 53.8% 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 ~616 days

Total

3

Last Release

2604d ago

Major Versions

v0.0.2 → v1.0.02019-05-14

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/450848?v=4)[Vagner Luz do Carmo](/maintainers/vluzrmos)[@vluzrmos](https://github.com/vluzrmos)

---

Top Contributors

[![vluzrmos](https://avatars.githubusercontent.com/u/450848?v=4)](https://github.com/vluzrmos "vluzrmos (7 commits)")[![marvinrabe](https://avatars.githubusercontent.com/u/515860?v=4)](https://github.com/marvinrabe "marvinrabe (6 commits)")

---

Tags

laravelSettingseloquent

### Embed Badge

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

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

###  Alternatives

[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k29.9M42](/packages/kirschbaum-development-eloquent-power-joins)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.0M88](/packages/mongodb-laravel-mongodb)[spatie/laravel-sluggable

Generate slugs when saving Eloquent models

1.5k12.4M294](/packages/spatie-laravel-sluggable)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[watson/validating

Eloquent model validating trait.

9733.4M53](/packages/watson-validating)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8723.1M23](/packages/yajra-laravel-oci8)

PHPackages © 2026

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