PHPackages                             schoolpalm/app-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. schoolpalm/app-settings

ActiveLibrary

schoolpalm/app-settings
=======================

A lightweight settings abstraction package providing a consistent API for reading and writing application settings without exposing how or where those settings are stored.

1.0.0(today)10MITPHPPHP ^8.2

Since Jul 27Pushed todayCompare

[ Source](https://github.com/codeparl/app-settings)[ Packagist](https://packagist.org/packages/schoolpalm/app-settings)[ Fund](https://schoolpalm.com)[ RSS](/packages/schoolpalm-app-settings/feed)WikiDiscussions master Synced today

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

SchoolPalm App Settings
=======================

[](#schoolpalm-app-settings)

 [![Latest Version on Packagist](https://camo.githubusercontent.com/324c299b81cd6d877b35fc233ca1d21f0683da18fe3169a79a3a46150b094929/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7363686f6f6c70616c6d2f6170702d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/schoolpalm/app-settings) [![GitHub Tests](https://camo.githubusercontent.com/7757dc69b0891aa65d9439edb391a2922b1f9b36b5f0665b9840e89d513fc771/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7363686f6f6c70616c6d2f6170702d73657474696e67732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d7465737473)](https://github.com/schoolpalm/app-settings/actions) [![Total Downloads](https://camo.githubusercontent.com/09337bd53b9af7b3a38ceb2f1427d60db194606bec662b2b8cbab3c435486f79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7363686f6f6c70616c6d2f6170702d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/schoolpalm/app-settings) [![License](https://camo.githubusercontent.com/2b55d272f7abd2e4a9445f713f7cae91b78525be6b552472ea4b7751025e592b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7363686f6f6c70616c6d2f6170702d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/schoolpalm/app-settings) [![PHP Version](https://camo.githubusercontent.com/c6b44d7ba487352c1bc03918ef2cb3f4e4085965accd4e9a9db8b6a273e25edc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7363686f6f6c70616c6d2f6170702d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://php.net)

A lightweight, storage-agnostic settings abstraction package for Laravel that provides a consistent, expressive API for reading and writing application settings — without exposing how or where those settings are stored.

**The package does not know anything about:**

- Database engines
- Eloquent Models
- Tenants or Schools
- Caching mechanisms (Redis, Laravel Cache, etc.)
- Any specific storage engine

Instead, the package delegates all persistence responsibilities to a layered architecture: **Facade → Manager → Builder → Resolver → Repository**.

---

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

[](#table-of-contents)

- [Installation](#installation)
- [Configuration](#configuration)
- [Architecture](#architecture)
- [Quick Start](#quick-start)
- [Basic CRUD Operations](#basic-crud-operations)
- [Fluent Builder API](#fluent-builder-api)
- [Settings Scope](#settings-scope)
- [Context Isolation](#context-isolation)
- [Settings Groups](#settings-groups)
- [Database Connections](#database-connections)
- [Cache Integration](#cache-integration)
- [Bulk Operations](#bulk-operations)
- [Setting Value Types](#setting-value-types)
- [Exception Handling](#exception-handling)
- [Migrations](#migrations)
- [Testing](#testing)
- [Complete API Reference](#complete-api-reference)
- [Design Philosophy](#design-philosophy)

---

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

[](#installation)

### Install via Composer

[](#install-via-composer)

```
composer require schoolpalm/app-settings
```

### Laravel Auto-Discovery

[](#laravel-auto-discovery)

The package's service provider and facade are automatically discovered by Laravel. No manual registration is required.

- **Service Provider:** `SchoolPalm\AppSettings\Providers\AppSettingsServiceProvider`
- **Facade:** `SchoolPalm\AppSettings\Facades\AppSettings`

The `AppSettings` facade is available globally after installation.

### Publishing Configuration

[](#publishing-configuration)

```
php artisan vendor:publish --tag=app-settings-config
```

This publishes the configuration file to `config/app-settings.php`.

### Publishing Migrations

[](#publishing-migrations)

```
# Publish main migration (standard applications)
php artisan vendor:publish --tag=app-settings-migrations

# Publish tenant migration (multi-tenant applications)
php artisan vendor:publish --tag=app-settings-tenant-migrations
```

Run migrations after publishing:

```
php artisan migrate
```

### Suggested Package

[](#suggested-package)

For high-performance cached settings with multi-tenant and multi-school support:

```
composer require schoolpalm/cache-store
```

This enables cache-first resolution while keeping the **app-settings** package completely decoupled from caching logic.

---

Configuration
-------------

[](#configuration)

Publish the configuration file and customize it:

```
