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(1y ago)0590MITPHPPHP ^8.2

Since Mar 8Pushed 1y 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 1mo ago

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

32

—

LowBetter than 72% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Recently: every ~28 days

Total

9

Last Release

687d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b853bd2307dbe0f6675b0da8e631ba7be53209f28075abb73d309f5901453e7e?d=identicon)[alisaleem](/maintainers/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

[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

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