PHPackages                             webafra/larasettings - 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. webafra/larasettings

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

webafra/larasettings
====================

A Laravel 12 compatible package to store custom settings in database and cache, with auto-discovery and publishable migrations.

1.0.0(3mo ago)0536↓51.6%1MITPHPPHP ^8.1CI passing

Since Feb 18Pushed 2mo ago1 watchersCompare

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

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

Laravel Setting (WebAfra)
=========================

[](#laravel-setting-webafra)

A Laravel 12 compatible package to store custom settings in the database and cache, with auto-discovery and publishable migrations &amp; models.

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

[](#installation)

Install via Composer:

```
composer require webafra/larasetting

```

> **Note:** Since this package supports **Laravel auto-discovery**, you **do not need to manually add the ServiceProvider or Facade**. If you want to override manually, the ServiceProvider and Facade are:

```
// config/app.php
'providers' => [
    ...
    Webafra\LaraSetting\LaraSettingServiceProvider::class,
],

'aliases' => [
    ...
    'Setting' => Webafra\LaraSetting\Facade\Setting::class,
],
```

Publishing Migrations &amp; Models
----------------------------------

[](#publishing-migrations--models)

To publish migrations and models to your project:

```
# Publish only migrations
php artisan vendor:publish --tag=migrations

# Publish only models
php artisan vendor:publish --tag=models

# Publish both migrations and models
php artisan vendor:publish --tag=all

```

> Migration files will automatically have timestamps added and duplicates will be skipped if they already exist. Available default groups: Setting::GROUP\_SITE, Setting::GROUP\_EMAIL, Setting::GROUP\_PAYMENT, Setting::GROUP\_CUSTOM

Usage
-----

[](#usage)

```
use Webafra\LaraSetting\Facade\Setting;

// Set a setting in a specific group
Setting::set('site_name', 'My Website', false, Setting::GROUP_SITE);

// Store multiple settings in a group
Setting::store([
    'key1' => 'value1',
    'key2' => 'value2'
], Setting::GROUP_CUSTOM);

// Get all settings by group
$siteSettings = Setting::getByGroup(Setting::GROUP_SITE);

// Store multiple primary settings (arrays are automatically serialized)
Setting::storePrimary([
    'main_key' => 'main_value',
    'options' => ['opt1', 'opt2']
]);

// Clear all settings cache
Setting::clean();
```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance82

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67.6% 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

Unknown

Total

1

Last Release

90d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8689072?v=4)[webafra](/maintainers/webafra)[@webafra](https://github.com/webafra)

---

Top Contributors

[![webafra](https://avatars.githubusercontent.com/u/8689072?v=4)](https://github.com/webafra "webafra (25 commits)")[![amirz-dev](https://avatars.githubusercontent.com/u/51723926?v=4)](https://github.com/amirz-dev "amirz-dev (12 commits)")

---

Tags

cache-storagelaravellaravel-5-packagelaravel-frameworksettings

### Embed Badge

![Health badge](/badges/webafra-larasettings/health.svg)

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

###  Alternatives

[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[aglipanci/laravel-eloquent-case

Adds CASE statement support to Laravel Query Builder.

115157.2k](/packages/aglipanci-laravel-eloquent-case)

PHPackages © 2026

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