laravel-settings
laravel-settings copied to clipboard
Call to undefined method Illuminate\Foundation\Application::share() (5.4)
[Symfony\Component\Debug\Exception\FatalThrowableError] Call to undefined method Illuminate\Foundation\Application::share()
Same problem can you please make a new release????
To fix this error please copy and paste this code into the SettingsServiceProvider.
Remove the current register method and place this in place of the old register method.
`public function register()
{
$this->mergeConfigFrom(
__DIR__ . '/config/settings.php', 'settings'
);
$this->app->singleton('settings', function ($app) {
$config = $app->config->get('settings', [
'cache_file' => storage_path('settings.json'),
'db_table' => 'settings'
]);
return new Settings($app['db'], new Cache($config['cache_file']), $config);
});
}`
@BirdyUK u can also install the dev master branch now
When u release new version for fix this bug "Call to undefined method Illuminate\Foundation\Application::share()" ?
Currently you can use dev-master
I will release a new major version asap.. Maybe in this week
and after more than 6 month still no release :)
vendor\efriandika\laravel-settings\src\SettingsServiceProvider.php line 41
Change this
$this->app['settings'] = $this->app->singleton(function ($app) {
to this
$this->app->singleton('settings', function ($app){
+1 with this problem. Please, publish the new version :D
+1. This is still an issue. Please update
+1
+1
Hello everyone, feel free to contribute.. :D