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

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

ranjbarali/laravel-setting
==========================

Easily save, update and get titles, descriptions, and more. it is very easy to use.

v1.0.0(4y ago)16MITPHP

Since May 8Pushed 3y agoCompare

[ Source](https://github.com/RanjbarAli/Laravel-Setting)[ Packagist](https://packagist.org/packages/ranjbarali/laravel-setting)[ Docs](https://github.com/ranjbarali/laravel-setting)[ RSS](/packages/ranjbarali-laravel-setting/feed)WikiDiscussions main Synced 1mo ago

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

[![Laravel Setting](https://camo.githubusercontent.com/2208e6ffb8560a620abee2a9dcf6eee463c3db120ac971384e05841d32794385/68747470733a2f2f73362e7575706c6f61642e69722f66696c65732f6c6f676f5f326a6a6a2e706e67)](https://camo.githubusercontent.com/2208e6ffb8560a620abee2a9dcf6eee463c3db120ac971384e05841d32794385/68747470733a2f2f73362e7575706c6f61642e69722f66696c65732f6c6f676f5f326a6a6a2e706e67)

Laravel Setting
===============

[](#laravel-setting)

Easily save, update and get titles, descriptions, and more. it is very easy to use.

This is great for storing and receiving general site information.

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

[](#installation)

***requires PHP 8+ and Laravel 9+***

via composer:

```
$ composer require RanjbarAli/Laravel-Setting
```

You can publish migration and configuration with:

```
php artisan vendor:publish --provider="RanjbarAli\LaravelSetting\LaravelSettingServiceProvider"
```

Migrate:

```
php artisan migrate
```

Usage
-----

[](#usage)

#### Initialize

[](#initialize)

```
setting()
```

#### Get All *(array)*

[](#get-all-array)

```
setting()->value
```

#### Get One *(string | array | integer | float | boolean)*

[](#get-one-string--array--integer--float--boolean)

```
setting('key')->value
```

#### Get Multiple *(array)*

[](#get-multiple-array)

```
setting(['key1', 'key2'])->value
```

#### Update *(boolean)*

[](#update-boolean)

```
setting('key')->set('new value')
```

#### Add *(boolean)*

[](#add-boolean)

```
setting()->add($key, $value, $type)
```

Type must be one of `"string"` , `"array"` , `"boolean"` , `"integer"` , `"float"`

default: `"string"`

#### Delete *(boolean)*

[](#delete-boolean)

```
setting('key')->delete()
```

#### Check Value *(boolean)*

[](#check-value-boolean)

```
setting('key')->is('value')
```

#### Check Value with Type *(boolean)*

[](#check-value-with-type-boolean)

```
setting('key')->is_exactly('value')
```

#### Check Exists *(boolean)*

[](#check-exists-boolean)

```
setting('key')->exists()
```

#### Recache

[](#recache)

```
setting()->restart()
```

Examples
--------

[](#examples)

#### add() : Add and Get One

[](#add--add-and-get-one)

```
setting()->add('key', ['item'], 'array');
setting('key')->value; // Output: ['item']
```

```
setting()->add('isOffline', true, 'boolean');
setting('isOffline')->value; // Output: true
```

```
setting()->add('key', 'value');
setting('key')->value; // Output: "value"
```

```
setting()->add('level', 5, 'integer');
setting('level')->value; // Output: 5
```

```
setting()->add('score', 6.5, 'float');
setting('score')->value; // Output: 6.5
```

#### set()

[](#set)

```
setting()->add('key', 'old value');
setting('key')->set('new value');
setting('key')->value; // Output: 'new value'
```

#### Get Multiple

[](#get-multiple)

```
setting()->add('key1', 'foo');
setting()->add('key2', 'bar');
setting(['key1', 'key2'])->value; // Output: [ 'key1' => 'foo', 'key2' => 'bar' ]
```

#### is()

[](#is)

```
setting()->add('key', '1');
setting('key')->is(1); // Output: true
```

#### is\_exactly()

[](#is_exactly)

```
setting()->add('key', '1');
setting('key')->is_exactly(1); // Output: false
```

#### exists()

[](#exists)

```
setting()->add('key', 'value');
setting('key')->delete();
setting('key')->exists(); // Output: false
```

in blade:

```
 {{ setting('title')->value }}

```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

1463d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/63ac8b2675ad4631f163f8d9f88bec55169e38af21c2f16a4763ba8d076a45d7?d=identicon)[RanjbarAli](/maintainers/RanjbarAli)

---

Top Contributors

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

---

Tags

laravellaravel-packagelaravel-settingphplaravelLaravelSetting

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M686](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[xefi/faker-php-laravel

Faker php integration with laravel

1915.1k](/packages/xefi-faker-php-laravel)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

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