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

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

alisaleem/laravel-settings
==========================

File based configurable settings for laravel applications

v1.2.2(2y ago)0607MITPHPPHP ^8.2

Since Mar 8Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (10)Used By (0)

File based configurable settings for laravel applications
=========================================================

[](#file-based-configurable-settings-for-laravel-applications)

[![Latest Version on Packagist](https://camo.githubusercontent.com/33c864efb43cb109f76f4106bb27282482ad37aaaaed07ea85f5a4af03228a3d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6973616c65656d2f6c61726176656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alisaleem/laravel-settings)[![Total Downloads](https://camo.githubusercontent.com/01736cb20e9aff0fd92dd5a387a597cd858911874b6b8b4e82f13000f1ffe393/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c6973616c65656d2f6c61726176656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alisaleem/laravel-settings)

Store your application settings in any of your applications storage filesystems. The schema for the settings is defined by a normal PHP class and all primitive types are supported. This also provides IDE type hints when reading to writing settings.

Updated values are written to the filesystem on destruct.

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

[](#installation)

You can install the package via composer:

```
composer require alisaleem/laravel-settings
```

Create your own Settings class and extend the abstract Settings class from this package

```
namespace App;

class MySettings extends \AliSaleem\LaravelSettings\BaseSettings
{
    public string $key;
    public string $anotherKey = 'Default Value';
}
```

Optionally add the helper function. This will also provide IDE type-hinting

```
if (! function_exists('settings')) {
    function settings(): \App\MySettings
    {
        return resolve(config('settings.class'));
    }
}
```

You can publish the config file with:

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

Set the class and storage location in the config file

```
return [
    'class' => \App\MySettings::class,

    'storage' => [
        'disk' => null,
        'path' => 'settings.json',
    ],
];
```

Usage
-----

[](#usage)

```
// To retrieve a value
$value = resolve(\App\MySettings::class)->key;
$value = settings()->anotherKey;

// To set a value
resolve(\App\MySettings::class)->key = 'changed';
settings()->anotherKey = 'changed';
```

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ali Saleem](https://github.com/alisaleem27)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~14 days

Recently: every ~28 days

Total

9

Last Release

734d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelSettings

### Embed Badge

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

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

###  Alternatives

[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)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

94135.4k5](/packages/marcelweidum-filament-expiration-notice)

PHPackages © 2026

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