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

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

robtrehy/laravel-application-settings
=====================================

A package for Laravel to store application settings for your project.

4.0.0(1y ago)01.5k[3 PRs](https://github.com/RobTrehy/LaravelApplicationSettings/pulls)MITPHPPHP ^8.2CI passing

Since Apr 22Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/RobTrehy/LaravelApplicationSettings)[ Packagist](https://packagist.org/packages/robtrehy/laravel-application-settings)[ RSS](/packages/robtrehy-laravel-application-settings/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (17)Used By (0)

Laravel Application Settings
============================

[](#laravel-application-settings)

[![](https://camo.githubusercontent.com/626c1be9b677daf2ceb643158603b34ca0ff35d9faac4352f9257048d0d95ad7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f526f6254726568792f4c61726176656c4170706c69636174696f6e53657474696e67732f74657374732e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/626c1be9b677daf2ceb643158603b34ca0ff35d9faac4352f9257048d0d95ad7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f526f6254726568792f4c61726176656c4170706c69636174696f6e53657474696e67732f74657374732e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)[![](https://camo.githubusercontent.com/bca646323b5f08dead047b9047cf27e0355d994f133d2663d0d42bee826e1572/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f526f6254726568792f4c61726176656c4170706c69636174696f6e53657474696e67733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/bca646323b5f08dead047b9047cf27e0355d994f133d2663d0d42bee826e1572/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f526f6254726568792f4c61726176656c4170706c69636174696f6e53657474696e67733f7374796c653d666c61742d737175617265)[![](https://camo.githubusercontent.com/318fd522582d7f4343788bfb039f460e8d09fbc0b810ae967915cb5f6ffacbf4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f526f6254726568792f4c61726176656c4170706c69636174696f6e53657474696e67733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/318fd522582d7f4343788bfb039f460e8d09fbc0b810ae967915cb5f6ffacbf4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f526f6254726568792f4c61726176656c4170706c69636174696f6e53657474696e67733f7374796c653d666c61742d737175617265)[![](https://camo.githubusercontent.com/00d973950479640da6af7477cc85562b5f64097fcd3f6fa1ae25204ad31c0aec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f6274726568792f6c61726176656c2d6170706c69636174696f6e2d73657474696e67733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/00d973950479640da6af7477cc85562b5f64097fcd3f6fa1ae25204ad31c0aec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f6274726568792f6c61726176656c2d6170706c69636174696f6e2d73657474696e67733f7374796c653d666c61742d737175617265)[![](https://camo.githubusercontent.com/484a5436625089e69b93f3295175f8d7dfde3adb53d83ca80dd4cacdb2b3d3ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f6274726568792f6c61726176656c2d6170706c69636174696f6e2d73657474696e67733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/484a5436625089e69b93f3295175f8d7dfde3adb53d83ca80dd4cacdb2b3d3ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f6274726568792f6c61726176656c2d6170706c69636174696f6e2d73657474696e67733f7374796c653d666c61742d737175617265)

This is a package for Laravel that can be used to store and access settings for your application. The settings are stored in a single database table. The default configuration stores this in a `settings` table.

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

[](#installation)

1. Run `composer require robtrehy/laravel-application-settings` to include this in your project.
2. Publish the config file with the following command ```
    php artisan vendor:publish --provider="RobTrehy\LaravelApplicationSettings\ApplicationSettingsServiceProvider" --tag="config"

    ```
3. Modify the published configuration file to your requirements. The file is located at `config/application-settings.php`.
4. Add the `settings` table to the database. A migration file is included, just run the following command ```
    php artisan vendor:publish --provider="RobTrehy\LaravelApplicationSettings\ApplicationSettingsServiceProvider" --tag="migrations" && php artisan migrate

    ```

    This will add the table defined in your configuration file to your database.

Configuration
-------------

[](#configuration)

Open `config/application-settings.php` to adjust the packages configuration.

If this file doesn't exist, run `php artisan vendor:public --provider="RobTrehy\LaravelApplicationSettings\ApplicationSettingsServiceProvider" --tag="config"`to create the default configuration file.

Set `table`, `key`, and `value` to match your requirements.

Laravel Application Settings uses the Laravel Cache driver to reduce the number of queries on your database. By default Laravel Caches using the `file` driver. If you wish to disable this, you can use the `null` driver. The cache key supplied by Laravel Application Settings can be set by changing the `cache.key` configuration value.

#### Example configuration

[](#example-configuration)

```
    'database' => [
        'table' => 'settings',
        'key' => 'key',
        'value' => 'value'
    ],
    'cache' => [
        'key' => 'application.settings'
    ]
```

Usage
-----

[](#usage)

### Set a Setting

[](#set-a-setting)

Use this method to set a setting for the application

```
ApplicationSettings::set(string [setting], [value]);
```

The setting will be immediately saved to the database

### Get a Setting

[](#get-a-setting)

Use this method to get the value of a setting for the application Pass a second arguement to return a default value if the setting is not set, defaults to `null`

```
ApplicationSettings::get(string [setting], string [default] = null);
```

### Get multiple Settings

[](#get-multiple-settings)

Use this method to get the value of multiple settings for the application Pass a second arguement to return a default value if the setting is not set, defaults to `null`

```
ApplicationSettings::get(array [setting], array [default] = null);
```

### Get all Setting

[](#get-all-setting)

Use this method to get all of the applications's settings as an array

```
ApplicationSettings::all()
```

### Check if an Application Setting is set

[](#check-if-an-application-setting-is-set)

To check if the application has a specific setting set, you can call

```
ApplicationSettings::has(string [setting]);
```

This will return `true` if a value was found, `false` if not.

### Save a Setting

[](#save-a-setting)

All settings are saved automatically when `ApplicationSettings::set();` is called.

### Delete a Setting

[](#delete-a-setting)

To delete a setting, you can call

```
ApplicationSettings::delete(string [setting]);
```

There will be no return from this call.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

License
-------

[](#license)

This Laravel package is free software distributed under the terms of the MIT license. See [LICENSE](LICENSE)

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance65

Regular maintenance activity

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% 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 ~132 days

Recently: every ~199 days

Total

12

Last Release

395d ago

Major Versions

1.1.3 → 2.0.02023-02-10

2.0.2 → 3.0.02024-03-18

3.0.0 → 4.0.02025-04-18

PHP version history (3 changes)1.0.0PHP ^7.3|^8.0

2.0.0PHP ^8.1

4.0.0PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![RobTrehy](https://avatars.githubusercontent.com/u/13102009?v=4)](https://github.com/RobTrehy "RobTrehy (40 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")

---

Tags

laravel

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4205.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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