Using Spatie Valuestore to hold frequently accessed settings
Domain specific settings
public function register()
{
$this->app->singleton('valuestore', function () {
return \Spatie\Valuestore\Valuestore::make(storage_path('app/settings.json'));
});
$values = $this->app->valuestore->all();
$this->app->bind('settings', function () use($values) {
return $values;
});
}app('valuestore')->put('EUR', $rate)Last updated