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

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

emresari89/laravel-options
==========================

Global options loaded from the database

v1.2.1(1y ago)0109MITPHPPHP &gt;=7.2.5

Since Mar 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/emresari89/laravel-options)[ Packagist](https://packagist.org/packages/emresari89/laravel-options)[ Docs](https://github.com/emresari89/laravel-options)[ RSS](/packages/emresari89-laravel-options/feed)WikiDiscussions main Synced yesterday

READMEChangelog (8)Dependencies (4)Versions (9)Used By (0)

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

[](#laravel-options)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5b4f76838eced099fa307397f7364879c3a7d2092aef97ffac3a8ed7b57b0ac6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656d72657361726938392f6c61726176656c2d6f7074696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/emresari89/laravel-options)[![Total Downloads](https://camo.githubusercontent.com/9b68c200570e20115fe54647dbcff1284f57822d9a5ddbdecf23b1e72428b9b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656d72657361726938392f6c61726176656c2d6f7074696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/emresari89/laravel-options)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/fd9cf4c35d1439a260629ab37acdc1404b104b726dc7d734139afec224489d99/68747470733a2f2f7472617669732d63692e6f72672f656d72657361726938392f6c61726176656c2d6f7074696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/emresari89/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 emresari89/laravel-options
```

### Publish, migrate

[](#publish-migrate)

By running `php artisan vendor:publish --provider="Emresari\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 all options
options();

// Get option by id
optionID($id);

// 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']);

// Set option with type (type 1 default)
option_type(['someKey' => 'someValue'],null,2);

// 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
```

License
-------

[](#license)

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

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance42

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Every ~204 days

Recently: every ~325 days

Total

8

Last Release

460d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/625d948dfdb74217ac59c79830305425a519a42438be12b854f17930664313f1?d=identicon)[emresari89](/maintainers/emresari89)

---

Top Contributors

[![emresari89](https://avatars.githubusercontent.com/u/29493496?v=4)](https://github.com/emresari89 "emresari89 (10 commits)")

---

Tags

databaseglobal-optionslaravelsettingssite-settingslaravel-optionsemresari89

### Embed Badge

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

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

###  Alternatives

[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[appstract/laravel-options

Global options loaded from the database

730443.2k4](/packages/appstract-laravel-options)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

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

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)

PHPackages © 2026

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