Skip to content

Provides accessibility to key - value based settings model

License

Notifications You must be signed in to change notification settings

ikerasLT/laravel-settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Settings

Provides accessibility to key - value based settings model

Instalation

Require this package with composer

composer require ikeraslt/laravel-settings

Add the ServiceProvider to the providers array in config/app.php

Ikeraslt\LaravelSettings\ServiceProvider::class,

If you want to use the facade, add this to your facades in config/app.php:

'Settings' => Ikeraslt\LaravelSettings\Facade::class,

Run the migrations. This will add the settings table to your database

php artisan migrate

Usage

Via helper

Get setting:

$value = settings('key');

Set value:

settings('key', 'value');

Get all:

settings()

Via facade

Get setting:

$value = Settings::get('key');

Set value:

Settings::set('key', 'value');

Get all:

Settings::getAll()

About

Provides accessibility to key - value based settings model

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages