PHPackages                             vaslv/laravel-settings - 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. vaslv/laravel-settings

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

vaslv/laravel-settings
======================

Reusable Laravel settings package with typed values and caching.

1.1.0(4mo ago)278MITPHPPHP ^8.2CI passing

Since Feb 16Pushed 4mo agoCompare

[ Source](https://github.com/vaslv/laravel-settings)[ Packagist](https://packagist.org/packages/vaslv/laravel-settings)[ RSS](/packages/vaslv-laravel-settings/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (9)Versions (11)Used By (0)

Laravel Settings
================

[](#laravel-settings)

Reusable Laravel package for storing typed settings in the database with caching and a clean API.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10-13

Laravel 13 requires PHP 8.3+ because the underlying `illuminate/*` 13.x components require it.

Installation
------------

[](#installation)

```
composer require vaslv/laravel-settings
```

Publish the config and migration:

```
php artisan vendor:publish --tag=settings-config
php artisan vendor:publish --tag=settings-migrations
```

Run migrations:

```
php artisan migrate
```

Configuration
-------------

[](#configuration)

`config/settings.php`

```
return [
    'table' => 'settings',
    'encryption' => [
        'enabled' => false,
    ],
    'cache' => [
        'enabled' => true,
        'ttl' => 3600,
        'key' => 'settings',
    ],
];
```

If you change `table`, the published migration will use the configured name.

Usage
-----

[](#usage)

### Facade

[](#facade)

```
use Settings;

Settings::get('site.legal_text');
Settings::set('site.enabled', true);
Settings::set('site.legal_text', '# Legal', 'markdown');
Settings::set('legal_text', '# Legal'); // group = null
```

### Helper

[](#helper)

```
setting('site.legal_text');
setting('site.enabled', false);
setting('site.legal_text', '# Legal', 'markdown');
setting()->groups();
```

Supported Types
---------------

[](#supported-types)

- string
- boolean
- integer
- float
- html
- json
- markdown

Types are stored explicitly in the DB and cast on read.

Cache
-----

[](#cache)

The package caches all settings under one key and clears it automatically on `set`.

Encryption
----------

[](#encryption)

Enable encryption to store raw values in encrypted form in the database. Values are decrypted on read.

```
return [
    'encryption' => [
        'enabled' => true,
    ],
];
```

Code Style
----------

[](#code-style)

Code is formatted to comply with Laravel Pint.

Compatibility
-------------

[](#compatibility)

The package is tested against these combinations:

- Laravel 10 on PHP 8.2
- Laravel 11 on PHP 8.2
- Laravel 12 on PHP 8.2
- Laravel 13 on PHP 8.3

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance75

Regular maintenance activity

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

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 ~5 days

Recently: every ~12 days

Total

10

Last Release

134d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/032ebe8f61d00ae1b569fd7f418e7f09825d093784070f7c2effd1c67d6fc3a0?d=identicon)[vaslv](/maintainers/vaslv)

---

Top Contributors

[![vaslv](https://avatars.githubusercontent.com/u/1648799?v=4)](https://github.com/vaslv "vaslv (13 commits)")

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/vaslv-laravel-settings/health.svg)

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.9M110](/packages/mongodb-laravel-mongodb)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k161.4k2](/packages/mike-bronner-laravel-model-caching)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)

PHPackages © 2026

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