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

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

strongnguyen/laravel-options
============================

Global options loaded from the database

6.1(4y ago)025MITPHPPHP &gt;=7.2.5

Since Mar 17Pushed 4y agoCompare

[ Source](https://github.com/strongnguyen29/laravel-options)[ Packagist](https://packagist.org/packages/strongnguyen/laravel-options)[ Docs](https://github.com/strongnguyen29/laravel-options)[ RSS](/packages/strongnguyen-laravel-options/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (26)Used By (0)

Laravel Options
===============

[](#laravel-options)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9955253679128f5a4abd3dee1a5a16fe06a2f6d0d997c5ec36f9d863deb05c58/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6170707374726163742f6c61726176656c2d6f7074696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/appstract/laravel-options)[![Total Downloads](https://camo.githubusercontent.com/1e19b1ec7f272c99ca09838434c2c85fe513c267703851962c0848e5440c012f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6170707374726163742f6c61726176656c2d6f7074696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/appstract/laravel-options)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/a4e9fb7db00b3fac6a633eb5f9309eef751c8d0b44fb023c89d25fc416bbe755/68747470733a2f2f7472617669732d63692e6f72672f6170707374726163742f6c61726176656c2d6f7074696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/appstract/laravel-options)

Global key-value store in the database

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

[](#installation)

To get started with laravel-options, use Composer to add the package to your project's dependencies:

```
composer require appstract/laravel-options
```

### Publish, migrate

[](#publish-migrate)

By running `php artisan vendor:publish --provider="StrongNguyen\Options\OptionsServiceProvider"` in your project all files for this package will be published. For this package, it's only a migration. Run `php artisan migrate` to migrate the table. There will now be an `options` table in your database.

Usage
-----

[](#usage)

With the `option()` helper, we can get and set options:

```
// Get option
option('someKey');

// Get option, with a default fallback value if the key doesn't exist
option('someKey', 'Some default value if the key is not found');

// Set option
option(['someKey' => 'someValue']);

// Remove option
option()->remove('someKey');

// Check the option exists
option_exists('someKey');
```

If you want to check if an option exists, you can use the facade:

```
use Option;

$check = Option::exists('someKey');
```

### Console

[](#console)

It is also possible to set options within the console:

```
php artisan option:set {someKey} {someValue}
```

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Contributions are welcome, [thanks to y'all](https://github.com/appstract/laravel-options/graphs/contributors) :)

About StrongNguyen
------------------

[](#about-strongnguyen)

StrongNguyen is a small team from The Netherlands. We create (open source) tools for webdevelopment and write about related subjects on [Medium](https://medium.com/appstract). You can [follow us on Twitter](https://twitter.com/teamappstract), [buy us a beer](https://www.paypal.me/teamappstract/10) or [support us on Patreon](https://www.patreon.com/appstract).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 57.3% 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 ~74 days

Recently: every ~169 days

Total

25

Last Release

1555d ago

Major Versions

3.0.0 → 4.0.02020-03-09

4.0.0 → 5.0.02020-03-26

4.1.0 → 5.1.02020-03-26

4.1.1 → 5.2.02020-09-08

5.2.0 → 6.02022-02-08

PHP version history (2 changes)0.1.0PHP &gt;=5.6

4.0.0PHP &gt;=7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/4862912e4eece3b87a40cee32916bc08a58cd3cc2b1910222b457b9d1949348e?d=identicon)[strongnguyen29](/maintainers/strongnguyen29)

---

Top Contributors

[![gizburdt](https://avatars.githubusercontent.com/u/1470623?v=4)](https://github.com/gizburdt "gizburdt (47 commits)")[![realrashid](https://avatars.githubusercontent.com/u/15607685?v=4)](https://github.com/realrashid "realrashid (6 commits)")[![MarkVaughn](https://avatars.githubusercontent.com/u/39970?v=4)](https://github.com/MarkVaughn "MarkVaughn (6 commits)")[![jerodev](https://avatars.githubusercontent.com/u/3493941?v=4)](https://github.com/jerodev "jerodev (5 commits)")[![christophheich](https://avatars.githubusercontent.com/u/16765979?v=4)](https://github.com/christophheich "christophheich (3 commits)")[![ovanschie](https://avatars.githubusercontent.com/u/3015449?v=4)](https://github.com/ovanschie "ovanschie (2 commits)")[![teuunn](https://avatars.githubusercontent.com/u/17406280?v=4)](https://github.com/teuunn "teuunn (2 commits)")[![uniconstructor](https://avatars.githubusercontent.com/u/1384545?v=4)](https://github.com/uniconstructor "uniconstructor (2 commits)")[![adriangonzales](https://avatars.githubusercontent.com/u/486071?v=4)](https://github.com/adriangonzales "adriangonzales (1 commits)")[![yaroslawww](https://avatars.githubusercontent.com/u/23663794?v=4)](https://github.com/yaroslawww "yaroslawww (1 commits)")[![akoepcke](https://avatars.githubusercontent.com/u/5311185?v=4)](https://github.com/akoepcke "akoepcke (1 commits)")[![armandsar](https://avatars.githubusercontent.com/u/3834314?v=4)](https://github.com/armandsar "armandsar (1 commits)")[![cjonstrup](https://avatars.githubusercontent.com/u/576584?v=4)](https://github.com/cjonstrup "cjonstrup (1 commits)")[![crivion](https://avatars.githubusercontent.com/u/15253384?v=4)](https://github.com/crivion "crivion (1 commits)")[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (1 commits)")[![meSingh](https://avatars.githubusercontent.com/u/2369397?v=4)](https://github.com/meSingh "meSingh (1 commits)")[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (1 commits)")

---

Tags

appstractlaravel-options

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

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

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[kirschbaum-development/commentions

A package to allow you to create comments, tag users and more

12369.2k](/packages/kirschbaum-development-commentions)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[glhd/special

1929.4k](/packages/glhd-special)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)

PHPackages © 2026

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