Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to undefined method Illuminate\Foundation\Application::share() (5.4) #24

Open
notflip opened this issue Feb 23, 2017 · 12 comments
Open

Comments

@notflip
Copy link

notflip commented Feb 23, 2017

[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined method Illuminate\Foundation\Application::share()

@astritzeqiri
Copy link

Same problem can you please make a new release????

@BirdyUK
Copy link

BirdyUK commented Feb 25, 2017

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);
        });
    }`

@astritzeqiri
Copy link

@BirdyUK u can also install the dev master branch now

@lybuneiv
Copy link

lybuneiv commented Mar 6, 2017

When u release new version for fix this bug "Call to undefined method Illuminate\Foundation\Application::share()" ?

@efriandika
Copy link
Owner

Currently you can use dev-master
I will release a new major version asap.. Maybe in this week

@stojankukrika
Copy link

and after more than 6 month still no release :)

@vinothsd
Copy link

vinothsd commented Sep 2, 2017

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){

@TiagoSilvaPereira
Copy link

+1 with this problem. Please, publish the new version :D

@peterkitonga
Copy link

+1. This is still an issue. Please update

@Max-Hutschenreiter
Copy link

+1

1 similar comment
@fabianmossberg
Copy link

+1

@efriandika
Copy link
Owner

Hello everyone, feel free to contribute.. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests