PHPackages                             fm-labs/cakephp-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. [Framework](/categories/framework)
4. /
5. fm-labs/cakephp-settings

ActiveCakephp-plugin[Framework](/categories/framework)

fm-labs/cakephp-settings
========================

Settings plugin for CakePHP

5.0.3(1y ago)01882PHPPHP &gt;=8.2CI failing

Since Jun 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/fm-labs/cakephp-settings)[ Packagist](https://packagist.org/packages/fm-labs/cakephp-settings)[ RSS](/packages/fm-labs-cakephp-settings/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (21)Used By (2)

Settings plugin for CakePHP
===========================

[](#settings-plugin-for-cakephp)

Store configuration settings in database.

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

[](#installation)

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
$ composer require fm-labs/cakephp-settings:^5

# For CakePHP 4.x
$ composer require fm-labs/cakephp-settings:^4
```

### Run migrations

[](#run-migrations)

```
$ ./bin/cake migrations migrate --plugin Settings
```

Usage
-----

[](#usage)

### Manage settings via Console

[](#manage-settings-via-console)

```
// Initialize settings from schema
$ ./bin/cake settings init

// List available settings
$ ./bin/cake settings list

// List configured settings values
$ ./bin/cake settings values

// Get setting value
$ ./bin/cake settings get-value

// Update setting value
$ ./bin/cake settings set-value
```

### Manage settings programmatically

[](#manage-settings-programmatically)

```
@TODO
```

### Load settings

[](#load-settings)

To load settings for your app:

```
// In your bootstrap.php or in Plugin::bootstrap()
\Cake\Core\Configure::load('app', 'settings');
```

To load plugin settings:

```
// In your bootstrap.php or in Plugin::bootstrap()
\Cake\Core\Configure::load('PluginName', 'settings');
```

Settings Schema file
--------------------

[](#settings-schema-file)

App and plugin settings are defined in settings schema file, which should be in your app's or plugins's config directory. `APP/config/settings.php` or `PLUGINS/MyPlugin/config/settings.php` respectively.

```
