PHPackages                             stratos/laravel-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. stratos/laravel-settings

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

stratos/laravel-settings
========================

A flexible and extensible settings management package for Laravel applications

v1.0.0(5mo ago)0361MITPHPPHP ^8.3CI passing

Since Nov 20Pushed 5mo agoCompare

[ Source](https://github.com/sabristratos/laravel-settings)[ Packagist](https://packagist.org/packages/stratos/laravel-settings)[ RSS](/packages/stratos-laravel-settings/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (2)Used By (1)

Laravel Settings
================

[](#laravel-settings)

[![Tests](https://camo.githubusercontent.com/d74c89993fee5101194fc7ef01397c370de71d5ee0ad23f5d01dde127278170b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d31333125323070617373696e672d73756363657373)](tests)[![PHP Version](https://camo.githubusercontent.com/ef0054230522e542bc1f908ac005c6c75888dea255bac910f9015e12095e31d7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e332d626c7565)](https://php.net)[![Laravel Version](https://camo.githubusercontent.com/ec976ad699fb5ffbb43421eabc292424a8b0bc5bed7a28e11e6349c67e2b6599/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d25354531322e302d726564)](https://laravel.com)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)[![Documentation](https://camo.githubusercontent.com/89648943131f785f7950a481c1bd1edae64c1d1fbf64f7bd79dd2a454f5d4e9a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d6c6976652d627269676874677265656e)](https://sabristratos.github.io/laravel-settings)

A flexible, enterprise-ready settings management package for Laravel applications. Manage global settings, user preferences, and dynamic configuration with powerful features including encryption, validation, audit trails, and granular permissions.

✨ Key Features
--------------

[](#-key-features)

- 🌍 **Global &amp; User Settings** - Application-wide and per-user preferences
- 🔒 **Encryption** - Secure sensitive data with Laravel's encryption
- ✅ **Validation** - Per-setting validation rules
- 📝 **Audit Trail** - Complete change history with rollback
- 🔐 **Permissions** - Role and permission-based access control
- 🌐 **Multilingual** - Translations for labels and descriptions
- ⚡ **Caching** - Automatic caching with smart invalidation
- 📦 **Import/Export** - Backup and migration (JSON/YAML)
- 🎯 **Type Casting** - Automatic type detection (string, int, bool, array, json)
- 🧪 **Well Tested** - 131 Pest tests with full coverage

📋 Requirements
--------------

[](#-requirements)

- PHP 8.3 or higher
- Laravel 12.0 or higher

🚀 Quick Start
-------------

[](#-quick-start)

### Installation

[](#installation)

```
composer require stratos/laravel-settings
php artisan vendor:publish --tag="settings-migrations"
php artisan migrate
```

### Basic Usage

[](#basic-usage)

```
use Stratos\Settings\Facades\Settings;

// Set a value
Settings::set('site.name', 'My Application');

// Get a value
$name = Settings::get('site.name', 'Default Name');

// Use helper
$name = setting('site.name');

// Blade directive
@setting('site.name')
```

### User Settings

[](#user-settings)

```
// Set user preference
Settings::user()->set('theme', 'dark');

// Get user preference
$theme = user_setting('theme', 'light');

// Blade

```

### Advanced Features

[](#advanced-features)

```
// Encrypted values
Settings::setEncrypted('api.stripe_key', 'sk_live_...');

// With validation
Settings::setWithMetadata(
    key: 'max_users',
    value: 100,
    validationRules: ['integer', 'min:1', 'max:1000']
);

// With permissions
Settings::setPermissions(
    key: 'api.credentials',
    viewType: 'roles',
    viewPermissions: ['admin', 'developer'],
    editType: 'roles',
    editPermissions: ['admin']
);

// View history
$history = Settings::getHistory('site.name');

// Rollback
Settings::restoreToVersion('site.name', $historyId);
```

### Artisan Commands

[](#artisan-commands)

```
# Create setting interactively
php artisan settings:create

# Set a setting
php artisan settings:set site.name "My App"

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

# List all settings
php artisan settings:list

# Export/Import
php artisan settings:export settings.json
php artisan settings:import settings.json
```

📚 Documentation
---------------

[](#-documentation)

For complete documentation, visit the [docs](docs) folder:

### Getting Started

[](#getting-started)

- **[Installation](docs/installation.md)** - Detailed setup and configuration
- **[Basic Usage](docs/usage.md)** - CRUD operations and helpers
- **[User Settings](docs/user-settings.md)** - Per-user preferences

### Features

[](#features)

- **[Advanced Features](docs/advanced-features.md)** - Validation, encryption, types, caching
- **[Permissions](docs/permissions.md)** - Access control system
- **[Audit &amp; History](docs/audit-history.md)** - Change tracking and rollback
- **[Import &amp; Export](docs/import-export.md)** - Backup and migration
- **[Events &amp; Observers](docs/events-observers.md)** - Event system

### Reference

[](#reference)

- **[API Reference](docs/api-reference.md)** - Complete API documentation
- **[Artisan Commands](docs/artisan-commands.md)** - CLI reference
- **[REST API](docs/rest-api.md)** - HTTP endpoints
- **[Database Schema](docs/database-schema.md)** - Table structure

### Guides

[](#guides)

- **[Recipes](docs/recipes.md)** - Practical examples
- **[Testing](docs/testing.md)** - Testing guide
- **[Migration Guides](docs/migration-guides.md)** - Migrate from other packages
- **[Troubleshooting](docs/troubleshooting.md)** - Common issues

🎯 Use Cases
-----------

[](#-use-cases)

Perfect for:

- **SaaS Applications** - Per-tenant or per-user configuration
- **API Credentials** - Securely store API keys with encryption
- **Feature Flags** - Toggle features dynamically
- **User Preferences** - Theme, language, timezone, notifications
- **Email Configuration** - Dynamic SMTP settings
- **Multi-Tenant Apps** - Tenant-specific settings
- **Enterprise Apps** - Audit compliance and change tracking

🆚 Comparison
------------

[](#-comparison)

FeatureLaravel SettingsSpatie SettingsConfig FilesGlobal Settings✅✅✅User Settings✅❌❌Encryption✅❌❌Validation✅❌❌Permissions✅❌❌Audit Trail✅❌❌Import/Export✅❌❌History/Rollback✅❌❌Caching✅✅✅Dynamic Updates✅✅❌🧪 Testing
---------

[](#-testing)

```
# Run tests
vendor/bin/pest

# Run with coverage
vendor/bin/pest --coverage
```

📝 Changelog
-----------

[](#-changelog)

See [CHANGELOG.md](CHANGELOG.md) for recent changes.

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

🔒 Security
----------

[](#-security)

If you discover any security-related issues, please email  instead of using the issue tracker.

📄 License
---------

[](#-license)

Laravel Settings is open-sourced software licensed under the [MIT license](LICENSE).

👨‍💻 Credits
-----------

[](#‍-credits)

- **Author**: Mohamed Sabri Ben Chaabane
- **Company**: [Stratos Digital](https://stratosdigital.com)
- **Contributors**: [All Contributors](../../contributors)

🌟 Support
---------

[](#-support)

If you find this package useful, please consider:

- ⭐ Starring the repository
- 🐛 [Reporting issues](https://github.com/sabristratos/laravel-settings/issues)
- 💡 [Suggesting features](https://github.com/sabristratos/laravel-settings/issues/new)
- 📖 [Improving documentation](docs)

---

**[📚 Read the Full Documentation](docs/index.md)** | **[🚀 View on GitHub](https://github.com/sabristratos/laravel-settings)**

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance69

Regular maintenance activity

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

179d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d87ebbf74a104baab27d995cd55aafaee5da84fa34ccf32a907e5cf22a6c357d?d=identicon)[sabristratos](/maintainers/sabristratos)

---

Top Contributors

[![sabristratos](https://avatars.githubusercontent.com/u/178621997?v=4)](https://github.com/sabristratos "sabristratos (16 commits)")

---

Tags

laravelconfigurationSettingspreferencesstratos

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/stratos-laravel-settings/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[torann/registry

Laravel registry manager for application configurations

222.0k](/packages/torann-registry)

PHPackages © 2026

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