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)0121MITPHPPHP &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 3w ago

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 62% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity12

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

514d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29493496?v=4)[Emre Sarıoğlu](/maintainers/emresari89)[@emresari89](https://github.com/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

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

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

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[api-platform/laravel

API Platform support for Laravel

58171.8k14](/packages/api-platform-laravel)[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)
