PHPackages                             appstract/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. [Database &amp; ORM](/categories/database)
4. /
5. appstract/laravel-options

ActiveLibrary[Database &amp; ORM](/categories/database)

appstract/laravel-options
=========================

Global options loaded from the database

8.0.0(1mo ago)730451.5k↓51.4%693MITPHPPHP &gt;=8.3CI passing

Since Mar 17Pushed 1mo ago17 watchersCompare

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

READMEChangelog (3)Dependencies (6)Versions (32)Used By (3)

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)

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="Appstract\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');
```

The helpers are available as Blade directives:

```
@option('someKey')

@option('someKey', 'Default value')

@optionExists('someKey')
    // Code
@endif
```

### 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 Appstract
---------------

[](#about-appstract)

Appstract 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

73

—

ExcellentBetter than 100% of packages

Maintenance93

Actively maintained with recent releases

Popularity58

Moderate usage in the ecosystem

Community38

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 60.2% 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 ~115 days

Recently: every ~262 days

Total

30

Last Release

34d ago

Major Versions

4.1.0 → 5.1.02020-03-26

4.1.1 → 5.2.02020-09-08

5.7.0 → 6.0.02024-06-03

6.0.0 → 7.0.02025-04-03

7.0.0 → 8.0.02026-05-06

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

4.0.0PHP &gt;=7.2.5

7.0.0PHP &gt;=8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1470623?v=4)[Gijs Jorissen](/maintainers/gizburdt)[@gizburdt](https://github.com/gizburdt)

![](https://avatars.githubusercontent.com/u/377001?v=4)[Ronald Krentz](/maintainers/Rokr)[@rokr](https://github.com/rokr)

![](https://avatars.githubusercontent.com/u/3015449?v=4)[Olav van Schie](/maintainers/ovanschie)[@ovanschie](https://github.com/ovanschie)

![](https://avatars.githubusercontent.com/u/17406280?v=4)[Teun de Kleijne](/maintainers/teuunn)[@teuunn](https://github.com/teuunn)

---

Top Contributors

[![gizburdt](https://avatars.githubusercontent.com/u/1470623?v=4)](https://github.com/gizburdt "gizburdt (74 commits)")[![apiaget](https://avatars.githubusercontent.com/u/634083?v=4)](https://github.com/apiaget "apiaget (7 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)")[![teuunn](https://avatars.githubusercontent.com/u/17406280?v=4)](https://github.com/teuunn "teuunn (4 commits)")[![christophheich](https://avatars.githubusercontent.com/u/16765979?v=4)](https://github.com/christophheich "christophheich (3 commits)")[![SpitsAdmin](https://avatars.githubusercontent.com/u/16835345?v=4)](https://github.com/SpitsAdmin "SpitsAdmin (2 commits)")[![ovanschie](https://avatars.githubusercontent.com/u/3015449?v=4)](https://github.com/ovanschie "ovanschie (2 commits)")[![uniconstructor](https://avatars.githubusercontent.com/u/1384545?v=4)](https://github.com/uniconstructor "uniconstructor (2 commits)")[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (1 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)")[![jornatf](https://avatars.githubusercontent.com/u/92311176?v=4)](https://github.com/jornatf "jornatf (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)")

---

Tags

databasekey-valuelaravellaravel-packageoptionsappstractlaravel-options

### Embed Badge

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

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

###  Alternatives

[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k29.9M42](/packages/kirschbaum-development-eloquent-power-joins)[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8733.1M23](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.4M2](/packages/glushkovds-phpclickhouse-laravel)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

436834.4k1](/packages/clickbar-laravel-magellan)[laravel-liberu/laravel-gedcom

A package that converts gedcom files to Eloquent models

782.5k1](/packages/laravel-liberu-laravel-gedcom)

PHPackages © 2026

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