PHPackages                             twom/laravel-setting - 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. twom/laravel-setting

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

twom/laravel-setting
====================

setting system

0.1.3(5y ago)06PHPPHP &gt;=7

Since Jun 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Twom2020/laravel-setting)[ Packagist](https://packagist.org/packages/twom/laravel-setting)[ Docs](https://github.com/Twom2020/laravel-setting)[ RSS](/packages/twom-laravel-setting/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Laravel Setting
---------------

[](#laravel-setting)

### Installation:

[](#installation)

```
composer require twom/laravel-setting

```

You must add the service provider to `config/app.php`

```
'providers' => [
	 // for laravel 5.8 and below
	 \Twom\Taggable\SettingServiceProvider::class,
];
```

Config:
-------

[](#config)

> config/setting.php

```
return [
  /**
   * drivers to save setting
   *
   * can be 'database', ...
   */
   "driver" => env("SETTING_DRIVER", "database"),

  /**
   * drivers list
   */
   "drivers" => [
	  "database" => [
		  "provider" => \Twom\Setting\src\Drivers\DB::class,
		 ],  // json => [ provider => .... ]
	  ],

  /**
    * statics settings
    */
    "settings" => [
	  "app_name" => "laravel",
	  "developer" => "ali ghale :)",
	 ],

  /**
   * static defaults settings
   */
   "default" => [
	  "another" => "does not have :("
	],
];
```

Use in normalize mode:
----------------------

[](#use-in-normalize-mode)

```
//	Single item
Setting::set("key", "value");
Setting::get("key", "default_value");
Setting::forget("key");

//	Multiple items
Setting::set(["one" => "value", "some" => "any..."]);
Setting::get(["one", "some"]);
Setting::forget(["key", "key-2"]);

Setting::all();
```

> **Note:** `default` can be `null` and is optional.

Nested:
-------

[](#nested)

```
// string
Setting::set("profile.notification.email", true);

// array
Setting::set([
	"profile" => [
		"notification" => [
			"sms" => true // or any value
		]
	],
]);

//	get string
Setting::get("profile.notification.email", "default");

//	result should be an array
Setting::get("profile");
```

Use Object mode:
----------------

[](#use-object-mode)

#### Your settingable model:

[](#your-settingable-model)

> **Note:** should be use the **Settingable** trait from `Twom\Setting\Support\Settingable`

```
namespace App;

use Illuminate\Database\Eloquent\Model;
use Twom\Setting\Support\Settingable;

class Post extends Model
{
  use Settingable;

  public $timestamps = false;

  protected $fillable = [
	  'title', // and another fields
  ];
}
```

### set and get:

[](#set-and-get)

```
$post = Post::find(1);

//	Just like normaliza
$post->setSetting("key", "value");
$post->getSetting("key", "default");
$post->forgetSetting("key");
$post->getAllSetting();
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Total

4

Last Release

2168d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

settinglaravel-settingsettingable

### Embed Badge

![Health badge](/badges/twom-laravel-setting/health.svg)

```
[![Health](https://phpackages.com/badges/twom-laravel-setting/health.svg)](https://phpackages.com/packages/twom-laravel-setting)
```

###  Alternatives

[laravel-admin-ext/config

Config extension for laravel-admin

97180.2k5](/packages/laravel-admin-ext-config)[thetispro/laravel5-setting

Persistent configuration settings for Laravel 5 - Create, Read, Update and Delete settings stored in files using JSON

289.7k](/packages/thetispro-laravel5-setting)

PHPackages © 2026

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