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

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

shuangz/laravel-option
======================

add option function to laravel

v2.0.x-dev(9y ago)016MITPHPPHP &gt;=5.5.9

Since Apr 11Pushed 8y agoCompare

[ Source](https://github.com/shuangz/laravel-option)[ Packagist](https://packagist.org/packages/shuangz/laravel-option)[ RSS](/packages/shuangz-laravel-option/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

获取扩展包
-----

[](#获取扩展包)

- 使用`composer require shuangz/laravel-option`命令，将自动下载所需文件，并将依赖写到composer.json文件中。
- 或者编辑`composer.json`文件，添加`"shuangz/laravel-option":"master"`到require字段，然后运行`composer update`更新依赖

安装方法
----

[](#安装方法)

- 打开config目录下的app.php文件；
- 将`Shuangz\Option\OptionServiceProvider::class`添加到`providers`字段中
- 将`"Option" => Shuangz\Option\OptionFacade::class`添加到`aliases`字段。提示：该步骤是可选的，如果不添加到别名字段，使用是必须使用完整的命名空间。
- 运行`php artisan migrate`完成数据库迁移

使用方法
----

[](#使用方法)

- 记得`use Option`或者`use Shuangz\Option\OptionFacade as Option`

```
Option::get("key") //获取一个设置值
Option::add("key", "value") //增加一个设置
Option::update("key", "value") //更新一个设置

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

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

3318d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laraveloption

### Embed Badge

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

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

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[forxer/laravel-gravatar

A library providing easy gravatar integration in a Laravel project.

4235.6k](/packages/forxer-laravel-gravatar)

PHPackages © 2026

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