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 2w 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

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

2886d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/41321413?v=4)[levoolabs](/maintainers/LevooLabs)[@LevooLabs](https://github.com/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.1k8.0M90](/packages/mongodb-laravel-mongodb)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k29.9M42](/packages/kirschbaum-development-eloquent-power-joins)[spiritix/lada-cache

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

592452.8k2](/packages/spiritix-lada-cache)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k322.4k1](/packages/cybercog-laravel-love)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2111.2M16](/packages/reedware-laravel-relation-joins)

PHPackages © 2026

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