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

ActiveLibrary

tahiriabdou/laravel-settings
============================

1.0.3(8y ago)133[1 PRs](https://github.com/TahiriAbdou/laravel-settings/pulls)MITPHPPHP &gt;=5.4.0

Since Aug 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/TahiriAbdou/laravel-settings)[ Packagist](https://packagist.org/packages/tahiriabdou/laravel-settings)[ RSS](/packages/tahiriabdou-laravel-settings/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (20)Used By (0)

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

[](#laravel-settings)

[![Build Status](https://camo.githubusercontent.com/20442b6b8a2840b61c0d778899c04f0e02e8db60e000f566caabc1114bf18aa3/68747470733a2f2f7472617669732d63692e6f72672f696f6e75746d696c6963612f6c61726176656c2d73657474696e67732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ionutmilica/goose)

Laravel settings it's a composer package made for our projects that allows developers to persist settings into database or json files.

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

[](#installation)

[PHP](https://php.net) 5.4+ and [Laravel](https://laravel.com) 5.\* are required.

To get the latest version of Laravel Settings run the following command:

```
composer require ionutmilica/laravel-settings

```

Once Laravel Settings is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key.

- `'IonutMilica\LaravelSettings\SettingsServiceProvider'`

You can register the Settings facade in the `aliases` key of your `config/app.php` file if you like.

- `'Settings' => 'IonutMilica\LaravelSettings\Facade'`

If you want to have persistent settings, you will need to add a new middleware in `app/Http/Kernel.php` to the `middleware` key.

- `'IonutMilica\LaravelSettings\SavableMiddleware',`

Laravel settings default driver is set to json. If you want to change it you can execute `artisan vendor:publish` command and then modify `app/config/settings.php` file.

If you chose database driver you should also migrate the database with `php artisan migrate`.

How to use it
-------------

[](#how-to-use-it)

For simple usage we provide a helper that provides all the features you need:

- Fetching a value

```
$canRegister = settings('restrictions.register');

if (! $canRegister) {
	// do something
}

// Fetching with default value

$canRegister = settings('restrictions.register', false);

// Fetching and save the setting if it does not exist

$canRegister = settings('restrictions.register, false, true);
```

- Storing a new setting or editing an old one?

```
settings()->set('my-setting', 'some-value');
```

- Checking for a setting existence

```
if (settings()->has('my-setting')) {
    // do something
}
```

- Wanting to delete a not needed setting?

```
settings()->forgot('my-setting');
```

- Force the saving of the settings into the datastore

```
settings()->set('the-answer', 42);
settings()->save();
```

You can also inject the settings instance into your laravel controller:

```
use IonutMilica\LaravelSettings\SettingsContract;

class RegistrationController extends Controller {

    public function register(Request $request, SettingsContract $settings)
    {
        if ($settings->get('restrictions.registration')) {
        	return redirect()->back();
        }

        // Do something
    }
}
```

More examples will follow!

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 82.1% 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 ~47 days

Recently: every ~134 days

Total

15

Last Release

3264d ago

Major Versions

0.5.1 → 1.0.02016-01-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c431dadb4d6fddd71191bcd2e2e2b346d0f56ba8f3f0f10ee61c83b97f53019?d=identicon)[TahiriAbdou](/maintainers/TahiriAbdou)

---

Top Contributors

[![ionutmilica](https://avatars.githubusercontent.com/u/627239?v=4)](https://github.com/ionutmilica "ionutmilica (23 commits)")[![TahiriAbdou](https://avatars.githubusercontent.com/u/2815449?v=4)](https://github.com/TahiriAbdou "TahiriAbdou (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

3.4k33.0M95](/packages/owen-it-laravel-auditing)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[casbin/laravel-authz

An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.

324339.9k4](/packages/casbin-laravel-authz)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[illuminatech/balance

Provides support for Balance accounting system based on debit and credit principle

16137.4k](/packages/illuminatech-balance)[kim/activity

Easily retrieve a list of users and guests that are online.

12830.4k](/packages/kim-activity)

PHPackages © 2026

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