LaravelPackages.net
Acme Inc.
Toggle sidebar
wimil/settings

This package allows you to save the configuration in a more persistent way. Use the database to save your settings, you can save values in json format. You can also override the Laravel configuration.

134
0
v1.0
About wimil/settings

wimil/settings is a Laravel package for this package allows you to save the configuration in a more persistent way. use the database to save your settings, you can save values in json format. you can also override the laravel configuration.. It currently has 0 GitHub stars and 134 downloads on Packagist (latest version v1.0). Install it with composer require wimil/settings. Discover more Laravel packages by wimil or browse all Laravel packages to compare alternatives.

Last updated

Laravel Settings

This package allows you to save the configuration in a more persistent way. Use the database to save your settings, you can save values in json format. You can also override the Laravel configuration.

Getting Started

1. Install

Run the following command:

composer require wimil/settings

2. Register (for Laravel < 5.5)

Register the service provider in config/app.php

Wimil\Settings\Provider::class,

Add alias if you want to use the facade.

'Settings' => Wimil\Settings\Facade::class,

3. Publish

Publish config file.

php artisan vendor:publish --provider="Wimil\Settings\Provider"

4. Configure

You can change the options of your app from config/settings.php file

Usage

You can either use the helper method like settings('foo') or the facade Settings::get('foo')

Facade

Settings::get('foo');
Settings::set('foo', 'bar');
$settings = Settings::all();

Helper

settings('foo');
settings('foo', 'bar');
$settings = settings();

Using your model

use Wimil\Settings\Model\Setting as BaseSetting;
class Setting extends BaseSetting {

}

Star History Chart