PHPackages                             jooservices/laravel-config - 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. jooservices/laravel-config

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

jooservices/laravel-config
==========================

Store and retrieve application configuration in database (MongoDB) with caching.

v1.1.0(1mo ago)0881[2 PRs](https://github.com/jooservices/laravel-config/pulls)1MITPHPPHP ^8.5CI passing

Since Mar 14Pushed 1mo agoCompare

[ Source](https://github.com/jooservices/laravel-config)[ Packagist](https://packagist.org/packages/jooservices/laravel-config)[ RSS](/packages/jooservices-laravel-config/feed)WikiDiscussions develop Synced 3w ago

READMEChangelog (2)Dependencies (22)Versions (9)Used By (1)

JOOservices Laravel Config
==========================

[](#jooservices-laravel-config)

[![CI](https://github.com/jooservices/laravel-config/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/jooservices/laravel-config/actions/workflows/ci.yml)[![OpenSSF Scorecard](https://camo.githubusercontent.com/c950dbe21b9a83343821b6d69f6548c43014de9aab5bd4405e273a2aa6ae5174/68747470733a2f2f6170692e736563757269747973636f726563617264732e6465762f70726f6a656374732f6769746875622e636f6d2f6a6f6f73657276696365732f6c61726176656c2d636f6e6669672f6261646765)](https://securityscorecards.dev/viewer/?uri=github.com/jooservices/laravel-config)[![PHP Version](https://camo.githubusercontent.com/2788132aa1e54031a6c94edcbf8688566d3e18cb5492cd1766836f74a24b27b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e352532422d626c75652e737667)](https://www.php.net/)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](./LICENSE)[![Packagist Version](https://camo.githubusercontent.com/6225946983418616dac320b85875fbf82fa246f2395308672b329fba0d34df60/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f6f73657276696365732f6c61726176656c2d636f6e666967)](https://packagist.org/packages/jooservices/laravel-config)

The JOOservices Laravel Config package stores Laravel application configuration in MongoDB and exposes typed runtime access through `JOOservices\\LaravelConfig\\Facades\\Config`.

Package name: `jooservices/laravel-config`

Install
-------

[](#install)

```
composer require jooservices/laravel-config
```

Publish configuration:

```
php artisan vendor:publish --tag=config-store-config
```

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

[](#requirements)

- PHP 8.5+
- Laravel 11 or 12
- MongoDB via `mongodb/laravel-mongodb`
- MongoDB PHP extension

What the package does
---------------------

[](#what-the-package-does)

- stores values as `group`, `key`, `value`, and `type` documents in MongoDB
- loads a full in-memory map on first read and optionally caches that map
- supports typed normalization for `string`, `int`, `float`, `bool`, `array`, `json`, and `null`
- provides runtime `get`, `set`, `forget`, `group`, `all`, `refresh`, and `fresh` operations
- ships Artisan commands for common operator tasks

Quick example
-------------

[](#quick-example)

```
use JOOservices\LaravelConfig\Facades\Config;

Config::set('system.site_name', 'XCrawler');
Config::set('system.enabled', true);
Config::set('payment.retry_times', 3);

$siteName = Config::get('system.site_name');
$system = Config::group('system');
$fresh = Config::fresh('system.site_name');
```

Path format and validation
--------------------------

[](#path-format-and-validation)

Paths must use the `group.key` format.

Rejected values include:

- empty paths
- missing dots
- leading dots
- trailing dots
- double dots
- empty group or empty key segments

Examples:

- valid: `system.site_name`
- valid: `payment.retry_times`
- invalid: `system`
- invalid: `.system.site_name`
- invalid: `system.`
- invalid: `system..site_name`

Cache and memory behavior
-------------------------

[](#cache-and-memory-behavior)

- `get`, `has`, `group`, and `all` load from memory first
- when memory is cold, the service reads the cached full map first, then MongoDB on cache miss
- `set` and `forget` update MongoDB and keep the cache coherent without overwriting unrelated keys
- `refresh` clears in-memory state and the configured cache key, then reloads from MongoDB
- `fresh` bypasses the in-memory map and cache for a direct MongoDB read

Important limitation:

- the in-memory map is process-local, so long-running workers, Horizon processes, Octane workers, or multiple PHP-FPM workers can hold stale state until `refresh()` is called or the process is recycled

MongoDB index requirement
-------------------------

[](#mongodb-index-requirement)

Create a unique compound index on `group` and `key` so each config path remains unique.

```
php artisan config-store:ensure-index
```

Equivalent Mongo shell command:

```
db.configs.createIndex(
  { group: 1, key: 1 },
  { name: 'config_group_key_unique', unique: true }
);
```

Artisan commands
----------------

[](#artisan-commands)

```
php artisan config-store:get system.site_name --default="Default"
php artisan config-store:set system.site_name XCrawler
php artisan config-store:set system.enabled true --type=bool
php artisan config-store:forget system.site_name
php artisan config-store:refresh
php artisan config-store:ensure-index
```

Security note
-------------

[](#security-note)

This package can store sensitive values, but it does not encrypt stored values by default. Do not place credentials or secrets in this store unless your MongoDB deployment, backups, and access controls already satisfy your security requirements.

Upgrade note
------------

[](#upgrade-note)

The canonical namespace for this package is now `JOOservices\\LaravelConfig\\`. Existing code that imports `JooServices\\LaravelConfig\\...` must be updated. This repository does not currently ship a compatibility alias layer.

Documentation
-------------

[](#documentation)

Start with:

- [Documentation Hub](./docs/README.md)
- [Installation](./docs/01-getting-started/01-installation.md)
- [Quick Start](./docs/01-getting-started/02-quick-start.md)
- [Configuration](./docs/02-user-guide/01-configuration.md)
- [Usage Guide](./docs/02-user-guide/02-usage-guide.md)
- [Release Process](./docs/04-development/06-release-process.md)
- [Risks, Legacy, and Gaps](./docs/05-maintenance/01-risks-legacy-and-gaps.md)
- [Changelog](./CHANGELOG.md)

AI support
----------

[](#ai-support)

This repository includes AI contributor guidance and skill files.

Start with:

- [AGENTS.md](./AGENTS.md)
- [CLAUDE.md](./CLAUDE.md)
- [AI Skills Map](./ai/skills/README.md)
- [AI Skills Usage Guide](./ai/skills/USAGE.md)

Development
-----------

[](#development)

```
composer lint
composer lint:all
composer test
composer test:coverage
composer check
composer ci
```

MongoDB must be available for integration tests.

Community
---------

[](#community)

- [Contributing](./CONTRIBUTING.md)
- [Security Policy](./SECURITY.md)
- [License](./LICENSE)

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance92

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

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

Total

2

Last Release

46d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/142772948?v=4)[JOOservices Ltd](/maintainers/jooservices)[@jooservices](https://github.com/jooservices)

---

Top Contributors

[![soulevilx](https://avatars.githubusercontent.com/u/2688707?v=4)](https://github.com/soulevilx "soulevilx (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")

---

Tags

cacheconfigconfigurationjooserviceslaravellaravel-packagemongodbphpphp85runtime-configurationlaravelconfigurationconfigmongodb

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jooservices-laravel-config/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.0M88](/packages/mongodb-laravel-mongodb)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k14.1M122](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9742.3M121](/packages/roots-acorn)[propaganistas/laravel-disposable-email

Disposable email validator

6012.9M7](/packages/propaganistas-laravel-disposable-email)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8723.1M23](/packages/yajra-laravel-oci8)

PHPackages © 2026

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