PHPackages                             vinlon/laravel-options - 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. vinlon/laravel-options

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

vinlon/laravel-options
======================

Global key value storage

0.1.2(5y ago)02091MITPHP

Since Jan 23Pushed 5y ago1 watchersCompare

[ Source](https://github.com/vinlon/laravel-options)[ Packagist](https://packagist.org/packages/vinlon/laravel-options)[ RSS](/packages/vinlon-laravel-options/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (4)Used By (1)

laravel-options
===============

[](#laravel-options)

Global key value storage

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

[](#installation)

```
composer require vinlon/laravel-options
```

Init Database
=============

[](#init-database)

```
php artisan migrate
```

Usage
=====

[](#usage)

- basic usage: set, get and del

```
opt()->set('key', 'value');
opt()->set('key', 'value_new');
$value = opt()->get('key');  // "value_new"
opt()->del('key');
$value = opt()->get('key', 'default_value'); // "default_value"
```

- batch operation: batchSet, batchGet, batchDel

```
opt()->batchSet(['key1' => 'value1', 'key2' => 'value2']);
opt()->batchSet(['key1' => 'value1_new', 'key2' => 'value2']);
$values = opt()->batchGet(['key1', 'key2']); // ["key1":"value1_new", "key2":"value2"]
opt()->batchDel(['key1', 'key2']);
$values = opt()->batchGet(['key1', 'key2']); // []
```

- use prefix

```
opt('test_')->set('key', 'test_value');
$value = opt()->get('test_key');
$value = opt('test_')->get('key'); // "test_value"
$value = opt()->withPrefix('test_')->get('key'); // "test_value"
opt('test_')->del('key');
$value = opt('test_')->get('key'); // null

opt('test_')->batchSet(['key' => 'test_value_new']);
$values = opt('test_')->batchGet(['key']);  // ["key":"test_value_new"]
$values = opt('test_')->batchGet(['key'], false);  // ["test_key":"test_value_new"]
opt('test_')->batchDel(['key']);
$values = opt('test_')->batchGet(['key']);  // []
```

Reference
=========

[](#reference)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

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

Total

3

Last Release

1845d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/277ca050c3c4260b26cadec49dafbaa2ff68d1487901ee3be0f930ad890b4d1e?d=identicon)[vinlon](/maintainers/vinlon)

---

Top Contributors

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

---

Tags

optionslaravel-optionsopt

### Embed Badge

![Health badge](/badges/vinlon-laravel-options/health.svg)

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

###  Alternatives

[symfony/options-resolver

Provides an improved replacement for the array\_replace PHP function

3.2k493.9M1.6k](/packages/symfony-options-resolver)[spatie/laravel-options

Create arrays of options from different sources

253294.8k2](/packages/spatie-laravel-options)[overtrue/laravel-options

Global options module for Laravel application.

5218.5k3](/packages/overtrue-laravel-options)[andreyryabin/sprint.options

Content options for 1C-Bitrix

185.7k](/packages/andreyryabin-sprintoptions)

PHPackages © 2026

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