PHPackages                             adnduweb/ci4\_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. adnduweb/ci4\_settings

ActiveLibrary

adnduweb/ci4\_settings
======================

Lightweight settings management for CodeIgniter 4

1.0.6.8(5y ago)038MITPHPPHP &gt;=7.2

Since Mar 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/adnduweb/ci4_settings)[ Packagist](https://packagist.org/packages/adnduweb/ci4_settings)[ Docs](https://github.com/adnduweb/ci4-settings)[ RSS](/packages/adnduweb-ci4-settings/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)Dependencies (1)Versions (15)Used By (0)

Adnduweb\\Ci4Settings
=====================

[](#adnduwebci4settings)

Lightweight settings management for CodeIgniter 4

Quick Start
-----------

[](#quick-start)

1. Install with Composer: `> composer require adnduweb/settings`
2. Update the database: `> php spark migrate -all`
3. Add settings: `> php spark settings:add timezone user America/New_York`
4. Load the service: `$settings = service('settings');`
5. Get/set settings per user:

```
$settings->timezone = $_POST['timezone_preference'];
...
$userTimezone = $settings->timezone;

```

Features
--------

[](#features)

Provides ready-to-use settings management for CodeIgniter 4

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

[](#installation)

Install easily via Composer to take advantage of CodeIgniter 4's autoloading capabilities and always be up-to-date:

- `> composer require adnduweb/settings`

Or, install manually by downloading the source files and adding the directory to `app/Config/Autoload.php`.

Once the files are downloaded and included in the autoload, run any library migrations to ensure the database is setup correctly:

- `> php spark migrate -all`

Configuration (optional)
------------------------

[](#configuration-optional)

The library's default behavior can be altered by extending its config file. Copy **Settings.php** to **app/Config/** and follow the instructions in the comments. If no config file is found in app/Config the library will use its own.

Usage
-----

[](#usage)

Once the library is included all the resources are ready to go and you are ready to start adding settings. You may import setting templates directly into the `settings` table or add them manually with the CLI command `php spark settings:add`.

**Settings** also comes with a database seeder for some recommended default templates. Run the seeder from the command line:

```
php spark db:seed \\Adnduweb\\Settings\\Database\\Seeds\\SettingsSeeder

```

This will add appropriately-scoped templates and default values for the following settings:

> databaseTimezone, serverTimezone, timezone, siteVersion, theme, perPage, brandName, brandLogo, orgName, orgLogo, orgUrl, orgAddress, orgPhone

Note that the seeder will *not* overwrite existing values so it is safe to run at any time. See [src/Database/Seeds/SettingsSeeder.php](src/Database/Seeds/SettingsSeeder.php) for the complete list with scopes, descriptions, and default values.

### Scope

[](#scope)

Settings take one of three scopes: session, user, global.

- Global settings are the same for every user and provide a dynamic way to set application-wide values
- User settings start with a default template value but each user may make their own default that persists across sessions
- Session settings start with a default template value and may be changed by a user but revert for each new session

Examples:

```
+---------------+---------+------------------+----------------------------------------------+------------+
| Name          | Scope   | Content          | Notes                                        | Protected? |
+---------------+---------+------------------+----------------------------------------------+------------+
| latestRelease | global  | 0.7.6            | Git-style tag of latest code release         | 0          |
| perPage       | user    | 10               | Default number of items to show per page     | 1          |
| timezone      | user    | America/New_York | Local timezone to use across the application | 1          |
| jobsSearch    | session |                  | User's most recent search term for jobs      | 1          |
+---------------+---------+------------------+----------------------------------------------+------------+

```

- When you release a new version of your software:

`$settings->latestRelease = $newVersion;`

- When a user searches a list of jobs:

```
$settings->jobsSearch = $_POST['searchTerm'];
$data['jobs'] = $jobModel->paginate($settings->perPage);

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Recently: every ~22 days

Total

14

Last Release

2035d ago

PHP version history (2 changes)1.0PHP ^7.0

1.0.6.7PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e505b99e2c7e2f9d1cc3999d81ce7e15a23a985046dccd36a75afb6b6dcb54c?d=identicon)[adnduweb](/maintainers/adnduweb)

---

Top Contributors

[![adnduweb](https://avatars.githubusercontent.com/u/34213953?v=4)](https://github.com/adnduweb "adnduweb (17 commits)")

### Embed Badge

![Health badge](/badges/adnduweb-ci4-settings/health.svg)

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

PHPackages © 2026

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