PHPackages                             armincms/option - 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. armincms/option

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

armincms/option
===============

The armincms option package.

0.1.4(5y ago)152.4k13MITPHP

Since Dec 7Pushed 5y ago1 watchersCompare

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

READMEChangelog (4)DependenciesVersions (6)Used By (3)

Option
======

[](#option)

A key-value storage for laravel

##### Table of Contents

[](#table-of-contents)

- [Introduction](#introduction)
- [Installation](#installation)
- [Configuration](#configuration)
- [Single Storing](#single-storing)
- [Mass Storing](#mass-storing)
- [Grouped Data](#grouped-data)
- [Retrieving](#retrieving)
- [Retrieving From Other Storage](#retrieving-from-other-storage)
- [Check For Existence](#check-for-existence)

Introduction
------------

[](#introduction)

Armincms Option is a package for store `key-value`. with this package, you can store values by `key` and `tag` in the simplest way into multiple storages.

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

[](#installation)

To get started with Armincms Option, first run:

```
    composer require armincms/option

```

Then publish configuration:

```
    php artisan vendor:publish --tag=armincms.option

```

This command publishes `config` and `migration` file into the appropriate path.

Configuration
-------------

[](#configuration)

This package supports `file` and `database` storage for storing data. The default storage is `file`. for change the storage type you have two way:

- With `.env` file: `OPTION_DRIVER=database`
- With `Config` respository: `Config::set('option.default', 'file')`

**Attention 1:***if you want use database storage you should run `php artisan migrate` in console.*

**Attention 2:***For access to `option-manager` by laravel container you can use `app('armincms.option')`*

**Attention 3:***For simple coding: you can use helper `option()` insteadof `app('armincms.option')`*

### Single Storing

[](#single-storing)

There exists two way for storing single data:

- first: `option()->put(key, value)`
- second: `option()->key = value`

### Mass Storing

[](#mass-storing)

For mass storing data use the followings method:

```
option()->putMany([
	key1 => value1,
	key2 => value2,
])

```

### Grouped Data

[](#grouped-data)

For grouping many option, can pass `tag` parameter when storing a data:

```
app('armincms.option')->put(key, value, tag)

```

Also; it's possible to attach a tag into data when mass storing:

```
app('armincms.option')->putMany([
	key1 => value1,
	key2 => value2,
], tag)

```

### Retrieving

[](#retrieving)

There exist many ways to retrieve your data.you can retrieve your data, `single` or `multiple`.

*single retrieving:*

To retrieve an option, you can use `option()->key`. but if you need `default` value for missed values; you can use `option(key, default)` or `option()->get(key, default)` .

*multiple retrieving:*

Also, retrieving multiple options is not difficult. you can retrieve many values by its keys with the `many` method; like `option()->many(keys)`. If you need default value for missed values; you can pass an associative array of `keys` and `default values`; like following:

```
	option()->many([
		key1 => key1-default,
		key2 => key2-default,
		key3,
		key4,
		key5 => key5-default
	])

```

And you can retrieve `tagged` values with `option()->tag(tag)`.

### Retrieving From Other Storage

[](#retrieving-from-other-storage)

For store an option into `none default` driver with assumption that default driver is `database`; follow this:

```
app('armincms.option')->store('file')->put(key, value, tag)
app('armincms.option')->store('file')->many([key1, key2], tag)

```

For retrieve you can use this:

```
app('armincms.option')->store('file')->get(key, default)
app('armincms.option')->store('file')->tag(tag)
app('armincms.option')->store('file')->many(keys)

```

### Check For Existence

[](#check-for-existence)

If you want to check for existance of an option ; you can use helper `option_exists(key)` or `option()->has(key)`.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.4% 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 ~90 days

Total

5

Last Release

1992d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/188c6af1615930311adb86de0f0f1e9241b3306d8f7680c385caa6aa0810ca48?d=identicon)[zareismail](/maintainers/zareismail)

---

Top Contributors

[![zareismail](https://avatars.githubusercontent.com/u/23401061?v=4)](https://github.com/zareismail "zareismail (17 commits)")[![baijunyao](https://avatars.githubusercontent.com/u/9360694?v=4)](https://github.com/baijunyao "baijunyao (1 commits)")

### Embed Badge

![Health badge](/badges/armincms-option/health.svg)

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

PHPackages © 2026

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