PHPackages                             shreeja\_digital/laravel-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. [Database &amp; ORM](/categories/database)
4. /
5. shreeja\_digital/laravel-app-settings

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

shreeja\_digital/laravel-app-settings
=====================================

Tiny DB + cache backed application settings for Laravel.

01PHP

Since Sep 3Pushed 8mo agoCompare

[ Source](https://github.com/anilnepal14949/laravel-app-settings)[ Packagist](https://packagist.org/packages/shreeja_digital/laravel-app-settings)[ RSS](/packages/shreeja-digital-laravel-app-settings/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel App Settings
====================

[](#laravel-app-settings)

A lightweight Laravel package for storing **dynamic, database-driven application settings**.
Unlike `.env` or static `config/*.php` files, these settings can be changed **at runtime** by administrators or business users — no code deployments required.

---

✨ Features
----------

[](#-features)

- Store key-value settings in the database (with optional cache).
- Get and set settings easily via helper or Facade.
- Support for arrays, JSON, casts (`bool`, `int`, `array`, etc.).
- Encrypt sensitive keys at rest (API tokens, passwords).
- Artisan commands for managing settings (`set`, `get`, `forget`, `export`, `import`).
- Configurable cache TTL.
- Blade helper and optional directive.
- Ready for multi-tenant or admin-panel integration.

---

📦 Installation
--------------

[](#-installation)

Require the package via Composer:

```
composer require shreeja_digital/laravel-app-settings
```

---

⚙️ Publish &amp; Migrate
------------------------

[](#️-publish--migrate)

```
php artisan vendor:publish --tag=settings-config
php artisan vendor:publish --tag=settings-migrations
php artisan migrate
```

---

🛠 Usage
-------

[](#-usage)

### Helper

[](#helper)

```
// Get with default
$title = settings('site.name', 'My Website');

// Set single
settings(['site.name' => 'Shreeja Digital']);

// Store arrays/JSON
settings(['ui.colors' => ['primary' => '#fe5516', 'dark' => '#112335']]);
```

### Facade

[](#facade)

```
use Settings;

// Get
Settings::get('site.name');

// Set
Settings::set('site.name', 'My App');

// Forget
Settings::forget('site.name');

// All settings
Settings::all();
```

### Blade

[](#blade)

```
{{ settings('site.name') }}
```

(Optional directive, if enabled in the service provider:)

```
@setting('site.name', 'Fallback Name')
```

---

🧑‍💻 Artisan Commands
--------------------

[](#‍-artisan-commands)

```
# Set a value
php artisan settings:set site.name "My Website"

# Get a value
php artisan settings:get site.name

# Delete a setting
php artisan settings:forget site.name

# Export to JSON
php artisan settings:export --path=storage/app/settings.json --pretty

# Import from JSON
php artisan settings:import storage/app/settings.json --no-overwrite
```

---

🔒 Encryption
------------

[](#-encryption)

Mark keys as encrypted in `config/settings.php`:

```
'encrypted_keys' => [
    'services.payment.secret',
    'mail.password',
],
```

Values will be encrypted before storage and decrypted on retrieval.

---

🔧 Config Options
----------------

[](#-config-options)

`config/settings.php`:

```
return [
    'cache_ttl' => null, // null = forever
    'use_cache_tags' => false, // set to true if cache store is configured
    'encrypted_keys' => [],
    'casts' => [
        // 'site.enabled' => 'bool',
        // 'ui.colors' => 'array',
    ],
];
```

---

🧪 Testing
---------

[](#-testing)

This package is testable with [Orchestra Testbench](https://github.com/orchestral/testbench).

1. Install dev dependencies:

```
composer require --dev orchestra/testbench pestphp/pest pestphp/pest-plugin-laravel
```

2. Run tests:

```
./vendor/bin/pest
php artisan test
```

---

❓ Why not `.env` or `config/`?
------------------------------

[](#-why-not-env-or-config)

- `.env` → server-level settings, not editable by app users.
- `config/*.php` → static arrays, cached, need redeploy to change.
- **This package** → runtime, DB-backed, user-editable settings with cache, export/import, encryption, and casting.

Perfect for **admin-editable site config**, **multi-tenant apps**, and **non-developer friendly control**.

---

📊 Badges (to enable after publishing to Packagist)
--------------------------------------------------

[](#-badges-to-enable-after-publishing-to-packagist)

[![Latest Version on Packagist](https://camo.githubusercontent.com/233cf89e755fbdffe712f5581ed8ecca1fdaf831d4b1947300079acafc77d91b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73687265656a615f6469676974616c2f6c61726176656c2d6170702d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shreeja_digital/laravel-app-settings)[![Total Downloads](https://camo.githubusercontent.com/a749c3cb5d6c50af6be6f9b46ca34e26d5987f8519e38b1cc51f89630b4ff22b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73687265656a615f6469676974616c2f6c61726176656c2d6170702d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shreeja_digital/laravel-app-settings)[![License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

---

📄 License
---------

[](#-license)

The MIT License (MIT). See [LICENSE.md](LICENSE.md) for details.

---

Happy Coding!

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance43

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/35637d0057797606c77e266d7556feb4e9b737fb132b575bce46bf37c71cc325?d=identicon)[developeranil](/maintainers/developeranil)

---

Top Contributors

[![anilnepal14949](https://avatars.githubusercontent.com/u/60917532?v=4)](https://github.com/anilnepal14949 "anilnepal14949 (1 commits)")[![SadaqaDeveloper](https://avatars.githubusercontent.com/u/134979896?v=4)](https://github.com/SadaqaDeveloper "SadaqaDeveloper (1 commits)")

### Embed Badge

![Health badge](/badges/shreeja-digital-laravel-app-settings/health.svg)

```
[![Health](https://phpackages.com/badges/shreeja-digital-laravel-app-settings/health.svg)](https://phpackages.com/packages/shreeja-digital-laravel-app-settings)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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