PHPackages                             padosoft/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. [Caching](/categories/caching)
4. /
5. padosoft/laravel-settings

ActiveLibrary[Caching](/categories/caching)

padosoft/laravel-settings
=========================

Persistent settings with caching in Laravel.

6.5.2(6mo ago)513.5k↓43.8%1[5 PRs](https://github.com/padosoft/laravel-settings/pulls)MITPHPPHP &gt;=7.4CI failing

Since May 14Pushed 6mo ago3 watchersCompare

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

READMEChangelogDependencies (8)Versions (74)Used By (0)

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

[](#laravel-settings)

[![License](https://camo.githubusercontent.com/32fe9b78a4b2edce241127c192a13b6f9707dde57aad4c815da704249e92c2d6/68747470733a2f2f706f7365722e707567782e6f72672f616e6c7574726f2f6c342d73657474696e67732f6c6963656e73652e737667)](http://opensource.org/licenses/MIT)

[![CircleCI](https://camo.githubusercontent.com/1101352a94157c63db91556f8a55f4bd4ac0d3153473c0c46ceb1473b8f5e6ea/68747470733a2f2f636972636c6563692e636f6d2f67682f7061646f736f66742f6c61726176656c2d73657474696e67732e7376673f7374796c653d736869656c64)](https://circleci.com/gh/padosoft/laravel-settings)

Persistent on database, fast in memory, application-wide settings for Laravel.

Performance are not invalidated because settings are automatic cached when retrived from database. Da completare docs.

Requirements
------------

[](#requirements)

```
PHP >= 7.1.3
Laravel 5.8.*|6.*|7.*|8.*|9.*|10.* (For Laravel framework 5.6.* or 5.7.* please use v1.*)

```

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

[](#installation)

1. `composer require padosoft/laravel-settings`
2. Publish the config and migration files by running `php artisan vendor:publish --provider="Padosoft\Laravel\Settings\ServiceProvider"`.
3. Run `php artisan migrate`

**Before running the migrations be sure you have in your `AppServiceProviders.php` the following lines:**

```
use Illuminate\Support\Facades\Schema;

public function boot()
{
    Schema::defaultStringLength(191);
}
```

Installation - Laravel &lt; 5.5
-------------------------------

[](#installation---laravel--55)

4. Add `Padosoft\Laravel\Settings\ServiceProvider` to the array of providers in `config/app.php`.
5. Add `'SettingsManager' => 'Padosoft\Laravel\Settings\Facade'` to the array of aliases in `config/app.php`.

Usage
-----

[](#usage)

You can either access the setting store via its facade or inject it by type-hinting towards the abstract class `anlutro\LaravelSettings\SettingStore`.

```
