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

ActiveLibrary

larapp/laravel-options
======================

User options for laravel application

v0.2.0(6y ago)03MITPHPPHP ^7.0

Since Oct 15Pushed 6y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (3)Used By (0)

Laravel user options
====================

[](#laravel-user-options)

This package simplifies working with user options of your laravel application. The options are saved in two places:

- default options (directives) are in config / options.php
- user options (directives) are stored in option table

When set, the default options will be overwritten by the corresponding user options. This override can be disabled by default, or it can be disabled in developer mode.

All values are cached and the number of database queries is minimized. When you save a new value (or delete an existing value), the cache is regenerated. The data is always fresh.

### Installation

[](#installation)

Install the package via composer:

```
$ composer require larapper/laravel-options
```

### Run migrations

[](#run-migrations)

Run the following command to run migrations.

```
$ php artisan migrate
```

### Publish config

[](#publish-config)

Run the following command to publish configs.

```
$ php artisan vendor:publish --provider="Larapp\Options\OptionsServiceProvider" --tag=options
```

### Create new default directives

[](#create-new-default-directives)

The default directives are stored in config / options.php

```
return [
   'some-directive' => 'some value',
];
```

### Create users directive

[](#create-users-directive)

The user options are accessed like any other object. Example to create:

```
$option = new \Larapper\Options\Model\Option();
$option->name = 'some-directive';
$option->type = 'string';
$option->value = 'some user value';
$option->save();
```

### Use options

[](#use-options)

You can determine the value of a directive using the standard config function:

```
$value = config('options.some-directive');
```

### Refresh cache

[](#refresh-cache)

Command

```
$ php artisan options:clear
```

Code

```
use Larapp\Options\Facade\Options;

Options::refresh();
```

### Casting values

[](#casting-values)

Everything is stored in the database as text. When the values are read, the type is automatically cast. You can control this cast in config / options-package.php

### Package setting

[](#package-setting)

See config/options-package.php for setting package behavior.

After its change you MUST refresh the cache!

### Versions

[](#versions)

- 0.1.0 First version
- 0.2.0 Add cache driver to package config

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

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

Total

2

Last Release

2390d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87e41339f6c20f753c29db8a24c0b0d8fdedca0828379b1abdbeb987972b4b76?d=identicon)[larapp](/maintainers/larapp)

---

Top Contributors

[![larapp](https://avatars.githubusercontent.com/u/56394849?v=4)](https://github.com/larapp "larapp (8 commits)")[![keniley](https://avatars.githubusercontent.com/u/32901228?v=4)](https://github.com/keniley "keniley (1 commits)")

### Embed Badge

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

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

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)

PHPackages © 2026

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