PHPackages                             rdcstarr/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. rdcstarr/laravel-settings

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

rdcstarr/laravel-settings
=========================

A simple settings package for Laravel.

v1.3.2(7mo ago)039MITPHPPHP ^8.0CI failing

Since Sep 13Pushed 7mo agoCompare

[ Source](https://github.com/rdcstarr/laravel-settings)[ Packagist](https://packagist.org/packages/rdcstarr/laravel-settings)[ Docs](https://github.com/rdcstarr/laravel-settings)[ RSS](/packages/rdcstarr-laravel-settings/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (12)Versions (34)Used By (0)

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

[](#laravel-settings)

[![Latest Version on Packagist](https://camo.githubusercontent.com/12a3d9b148bb6da5b1daa2cc95a7fe4d52ad70e953d8e80fcbd2a4405d4add25/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72646373746172722f6c61726176656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rdcstarr/laravel-settings)[![Tests](https://camo.githubusercontent.com/27b72ec4d6be8ad8489291fc4f5cd986d8ceab67ce62b254d23a97e9ee44b6d0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f72646373746172722f6c61726176656c2d73657474696e67732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/rdcstarr/laravel-settings/actions)[![Code Style](https://camo.githubusercontent.com/8b0787c8e40f18607ed5a73494b4bbde5cc14b3ae965f32fdb5c95c8d07f4562/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f72646373746172722f6c61726176656c2d73657474696e67732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/rdcstarr/laravel-settings/actions)[![Downloads](https://camo.githubusercontent.com/41d69b86c1d62864de9de502a1762f273fabb485d28e6cb1715c0974162853e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72646373746172722f6c61726176656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rdcstarr/laravel-settings)

> Simple settings management for Laravel — because configuration should be easy.

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

[](#-features)

- ⚡ **Cache built-in** – automatic caching for blazing-fast reads
- 🔄 **Smart type casting** – automatic conversion between strings, integers, booleans, arrays, and JSON
- 📦 **Batch operations** – set multiple values at once with `setMany()`
- 🛠️ **Artisan commands** – manage settings directly from the terminal
- 💯 **No exceptions** – returns `false` on failure, never crashes your app

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

[](#-installation)

Install the package via Composer:

```
composer require rdcstarr/laravel-settings
```

### Automatic Installation (Recommended)

[](#automatic-installation-recommended)

Run the install command to publish and run the migrations:

```
php artisan settings:install
```

### Manual Installation

[](#manual-installation)

Alternatively, you can install manually:

1. Publish the migrations:

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

2. Run the migrations:

```
php artisan migrate
```

🛠️ Artisan Commands
-------------------

[](#️-artisan-commands)

Manage your settings directly from the command line:

```
# List all settings
php artisan settings:list

# Get a specific setting
php artisan settings:get app.name

# Set a setting
php artisan settings:set app.name "My Application"

# Delete a setting
php artisan settings:delete old.setting [--force]

# Clear cache
php artisan settings:clear-cache [--force]
```

🔑 Usage
-------

[](#-usage)

### Basic Operations

[](#basic-operations)

```
// Get a setting (returns false if not found)
$name = settings()->get('app.name', 'Default Name');

// Set a setting (returns true on success, false if unchanged or failed)
settings()->set('app.name', 'My Application');

// Check if a setting exists
if (settings()->has('app.name')) {
    // Setting exists
}

// Delete a setting (returns true if deleted, false otherwise)
settings()->delete('old.setting');

// Get all settings
$all = settings()->all(); // Collection
```

### Batch Operations

[](#batch-operations)

```
// Set multiple settings at once
settings()->setMany([
    'app.name' => 'My Application',
    'app.theme' => 'dark',
    'app.language' => 'en',
    'mail.driver' => 'smtp',
    'mail.host' => 'smtp.example.com',
]);
```

### Helper Function

[](#helper-function)

```
// Quick access with helper
$theme = settings('app.theme', 'light');

// Same as
$theme = settings()->get('app.theme', 'light');
```

### Using the Facade

[](#using-the-facade)

```
use Rdcstarr\Settings\Facades\Settings;

Settings::set('app.name', 'My App');
$name = Settings::get('app.name', 'Default');
Settings::delete('old.setting');
```

### Cache Management

[](#cache-management)

```
// Clear the cache (returns true on success)
settings()->flushCache();
```

### Smart Type Casting

[](#smart-type-casting)

The package automatically handles type conversion:

```
// Integers
settings()->set('max_users', 100);
settings()->get('max_users'); // returns (int) 100

// Booleans
settings()->set('maintenance_mode', true);
settings()->get('maintenance_mode'); // returns (bool) true

// Arrays
settings()->set('config', ['key' => 'value']);
settings()->get('config'); // returns array

// Null values
settings()->set('optional', null);
settings()->get('optional'); // returns null
```

💡 Real-World Examples
---------------------

[](#-real-world-examples)

```
// Application configuration
settings()->setMany([
    'site.name' => 'My Website',
    'site.description' => 'A wonderful site',
    'site.maintenance_mode' => false,
]);

// Feature flags
if (settings()->get('features.new_dashboard', false)) {
    return view('dashboard.new');
}

// User preferences
settings()->set("user.{$userId}.theme", 'dark');
settings()->set("user.{$userId}.language", 'en');

// Email settings
$mailConfig = [
    'mail.driver' => 'smtp',
    'mail.host' => 'smtp.mailtrap.io',
    'mail.port' => 2525,
    'mail.username' => 'user',
    'mail.password' => 'pass',
];
settings()->setMany($mailConfig);

// API keys and secrets
settings()->set('services.stripe.key', 'sk_test_...');
settings()->set('services.stripe.secret', 'whsec_...');
```

🧪 Testing
---------

[](#-testing)

```
composer test
```

📖 Resources
-----------

[](#-resources)

- [Changelog](CHANGELOG.md) for more information on what has changed recently. ✍️

👥 Credits
---------

[](#-credits)

- [Rdcstarr](https://github.com/rdcstarr) 🙌

📜 License
---------

[](#-license)

- [License](LICENSE.md) for more information. ⚖️

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance64

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

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

Every ~2 days

Total

33

Last Release

220d ago

### Community

Maintainers

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

---

Top Contributors

[![rdcstarr](https://avatars.githubusercontent.com/u/42062586?v=4)](https://github.com/rdcstarr "rdcstarr (39 commits)")

---

Tags

laravelSettingsgroupslaravel-settingsRdcstarr

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)[tapp/filament-form-builder

User facing form builder using Filament components

132.4k3](/packages/tapp-filament-form-builder)

PHPackages © 2026

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