Answer the question
In order to leave comments, you need to log in
New service provider won't let you install LARAVEL?
There is a service provider SettingsServiceProvider
class SettingsServiceProvider extends ServiceProvider
{
public function register()
{
//
}
public function boot(Factory $cache, Setting $settings)
{
$settings = $cache->remember('settings', 60, function() use ($settings)
{
return $settings->pluck('value', 'key')->all();
});
config()->set('settings', $settings);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question