PHPackages                             utyemma/larasetting - 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. utyemma/larasetting

ActiveLibrary

utyemma/larasetting
===================

Quick and easy app settings for laravel applications

v1.08(5mo ago)382MITPHPPHP &gt;=7.0

Since Nov 20Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/UtyEmma/lara-settings)[ Packagist](https://packagist.org/packages/utyemma/larasetting)[ RSS](/packages/utyemma-larasetting/feed)WikiDiscussions main Synced today

READMEChangelog (9)DependenciesVersions (11)Used By (0)

LaraSettings
============

[](#larasettings)

Description
-----------

[](#description)

LaraSettings is a Laravel package that simplifies the management of application settings. It provides a structured and extensible way to define, retrieve, and update settings stored in the database. It includes useful commands for generating and seeding settings classes, making it easy to customize for various use cases.

---

Table of Contents
-----------------

[](#table-of-contents)

1. [Requirements](#requirements)
2. [Installation](#installation)
3. [Usage](#usage)
    - [Defining a Settings Class](#defining-a-settings-class)
    - [Seeding Settings](#seeding-settings)
    - [Retrieving and Updating Settings](#retrieving-and-updating-settings)
    - [Strict Mode](#strict-mode)
4. [Contributing](#contributing)
5. [Maintainers](#maintainers)
6. [License](#license)

---

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

[](#requirements)

- PHP 8.0+
- Laravel 9.0+

---

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

[](#installation)

1. Install the package via Composer:

    ```
    composer require utyemma/larasettings
    ```
2. Publish the migration file:

    ```
    php artisan vendor:publish --tag=larasettings-migrations
    ```
3. Run the migrations to create the `settings` table:

    ```
    php artisan migrate
    ```

---

Usage
-----

[](#usage)

### Defining a Settings Class

[](#defining-a-settings-class)

Use the `make:setting` command to create a new settings class:

```
php artisan make:setting ExampleSettings
```

This will generate a new settings class in the `App\Settings` namespace. Define your options, labels, and casts within the class to tailor it to your application's needs.

### Seeding Settings

[](#seeding-settings)

To seed settings into the database, use the `settings:seed` command:

```
php artisan settings:seed --class=ExampleSettings
```

Replace `ExampleSettings` with the name of your settings class. This will populate the database with the default attributes and values defined in the class.

### Retrieving and Updating Settings

[](#retrieving-and-updating-settings)

You can interact with settings using dynamic property access or methods:

#### Retrieving a Setting

[](#retrieving-a-setting)

```
$exampleSettings = app(\App\Settings\ExampleSettings::class);
$value = $exampleSettings->some_key; // Retrieve the value of a setting
```

#### Updating a Setting

[](#updating-a-setting)

```
$exampleSettings->some_key = 'New Value'; // Update the value of a setting
```

#### Bulk Updating Settings

[](#bulk-updating-settings)

```
$exampleSettings->update([
    'key1' => 'Value1',
    'key2' => 'Value2',
]);
```

#### Fetching All Settings

[](#fetching-all-settings)

```
$settingsArray = $exampleSettings->toArray();
```

### Strict Mode

[](#strict-mode)

LaraSettings operates in strict mode by default. Strict mode ensures that only settings defined in the `options` array of a settings class can be updated or created. This prevents accidental changes to undefined settings. When enabled, attempting to update an undefined setting will throw an exception. Ensure that all valid keys are listed in the `options` array of your settings class.

#### Disabling Strict Mode

[](#disabling-strict-mode)

If you want to allow dynamic creation of settings that are not predefined in the `options` array, you can set the `$strict` property to `false` in your settings class:

```
protected $strict = false;
```

---

Contributing
------------

[](#contributing)

Contributions are welcome! To contribute:

1. Fork the repository.
2. Create a feature branch.
3. Submit a pull request.

---

Maintainers
-----------

[](#maintainers)

- Utibe-Abasi Emmanuel ([GitHub](https://github.com/UtyEmma))

---

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

34

—

LowBetter than 79% of packages

Maintenance70

Regular maintenance activity

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

Recently: every ~65 days

Total

10

Last Release

177d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/55f18141894daa277e3d98b6c1211a2a991fa2b9e83c18b3613af10ba2324b72?d=identicon)[utyemma](/maintainers/utyemma)

---

Top Contributors

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

---

Tags

settinglaravel-settingLara Setting

### Embed Badge

![Health badge](/badges/utyemma-larasetting/health.svg)

```
[![Health](https://phpackages.com/badges/utyemma-larasetting/health.svg)](https://phpackages.com/packages/utyemma-larasetting)
```

###  Alternatives

[laravel-admin-ext/config

Config extension for laravel-admin

97179.4k5](/packages/laravel-admin-ext-config)[selective/config

Config component, strictly typed

16182.0k2](/packages/selective-config)[janiskelemen/laravel-setting

Laravel Settings Manager

5214.5k](/packages/janiskelemen-laravel-setting)[thetispro/laravel5-setting

Persistent configuration settings for Laravel 5 - Create, Read, Update and Delete settings stored in files using JSON

259.7k](/packages/thetispro-laravel5-setting)

PHPackages © 2026

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