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

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

altairwn/laravel-options
========================

Global options loaded from the database

2.0.0(1y ago)0131MITPHPPHP &gt;=7.2.5

Since Mar 28Pushed 1y agoCompare

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

READMEChangelog (2)Dependencies (4)Versions (3)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="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

28

—

LowBetter than 54% of packages

Maintenance44

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 53.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 ~339 days

Total

2

Last Release

436d ago

Major Versions

1.0.0 → 2.0.02025-03-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ecb7b824691f15f3bdea05d22255cf524469c8b18fb54bcfb44db47e9510b87?d=identicon)[Altair4713](/maintainers/Altair4713)

---

Top Contributors

[![gizburdt](https://avatars.githubusercontent.com/u/1470623?v=4)](https://github.com/gizburdt "gizburdt (56 commits)")[![AltairWN](https://avatars.githubusercontent.com/u/8718859?v=4)](https://github.com/AltairWN "AltairWN (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)")[![apiaget](https://avatars.githubusercontent.com/u/634083?v=4)](https://github.com/apiaget "apiaget (5 commits)")[![teuunn](https://avatars.githubusercontent.com/u/17406280?v=4)](https://github.com/teuunn "teuunn (3 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)")[![uniconstructor](https://avatars.githubusercontent.com/u/1384545?v=4)](https://github.com/uniconstructor "uniconstructor (2 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)")[![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)")

---

Tags

laravel-options

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/altairwn-laravel-options/health.svg)](https://phpackages.com/packages/altairwn-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

255.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)
