PHPackages                             levoolabs/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. levoolabs/settings

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

levoolabs/settings
==================

Settings table for Laravel.

1.0.1(7y ago)015[1 issues](https://github.com/LevooLabs/settings/issues)MITPHPPHP ^7.1.3

Since Jul 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/LevooLabs/settings)[ Packagist](https://packagist.org/packages/levoolabs/settings)[ RSS](/packages/levoolabs-settings/feed)WikiDiscussions master Synced 3d ago

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

LevooLabs Settings
==================

[](#levoolabs-settings)

LevooLabs Settings is a key value pair configuration manager for Laravel. The setting values are stored in the database and cached until modification.

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

[](#installation)

### Step 1: Install package

[](#step-1-install-package)

Install the package through [Composer](http://getcomposer.org/).

Run the Composer require command from the Terminal:

```
composer require levoolabs/settings

```

### Step 2: Migrations

[](#step-2-migrations)

Run migrations with artisan command:

```
php artisan migrate

```

Usage
=====

[](#usage)

You can use the `LevooLabs\Settings\Facades\Setting` facade or the helper functions to manage your configurations. (The `Setting` alias is automatically registered for the facade class.)

### Get by name

[](#get-by-name)

```
$setting = Setting::get('name');
```

```
$setting = setting('name');
```

### Set by name

[](#set-by-name)

```
Setting::set('name', $value);
```

```
setting('name', $value);
```

### Check if setting exists or not

[](#check-if-setting-exists-or-not)

```
if (Setting::exists('name')) {
    //
}
```

```
if (setting_exists('name')) {
    //
}
```

### Types

[](#types)

All setting values are stored as text but you can use different functions for auto typecasting. The first parameter is the name of the setting and the second is the value. With one parameter all the functions work as a *getter* with two parameters they work as a *setter*.

```
setting_bool('vouchers_enabled', true);
setting_int('max_voucher_per_order', 2)
setting_collection('available_countries', $country_array)
setting_json('meta_description', ['en' => '...', 'hu' => '...'])
setting_secret('my_secret', $secret)
```

```
Setting::bool('vouchers_enabled', true);
Setting::int('max_voucher_per_order', 2)
Setting::collection('available_countries', $country_array)
Setting::json('meta_description', ['en' => '...', 'hu' => '...'])
Setting::secret('my_secret', $secret)
```

- The collection method always returns a [Collection](https://laravel.com/docs/5.6/collections). If the setting doesn't exist it returns an empty one. The `$value` for the setter can be an array or a `Collection`.
- The secret method will use Laravel's [Encrypter](https://laravel.com/docs/5.6/encryption) to encrypt(*setter*) and decrypt(*getter*) values.

### Views

[](#views)

Available [blade directives](https://laravel.com/docs/5.6/blade) you can use in your views:

```
@setting('max_voucher_per_order')
```

```
@settingexists('meta_description')

@else
    ...
@endsettingexists
```

```
@settingtrue('vouchers_enabled')

@else
    ...
@endsettingtrue
```

License
-------

[](#license)

LevooLabs Settings is licensed under the [MIT License](http://opensource.org/licenses/MIT).

Copyright 2018 [LevooLabs](http://levoolabs.com/)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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 ~14 days

Total

2

Last Release

2839d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a11d37583551af0786595929de53ccc1da7d9485db9e29c54334c38a01a9187d?d=identicon)[LevooLabs](/maintainers/LevooLabs)

---

Top Contributors

[![adamtrll](https://avatars.githubusercontent.com/u/10064903?v=4)](https://github.com/adamtrll "adamtrll (5 commits)")

---

Tags

laravelSettingseloquentcache

### Embed Badge

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

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[ymigval/laravel-model-cache

Laravel package for caching Eloquent model queries

7642.2k3](/packages/ymigval-laravel-model-cache)[morilog/infinity-cache

Infinity cache for Laravel Eloquent models and queries

3115.8k](/packages/morilog-infinity-cache)[authentik/eloquent-cache

Easily cache your Laravel's Eloquent models

573.9k](/packages/authentik-eloquent-cache)

PHPackages © 2026

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