laravel-settings icon indicating copy to clipboard operation
laravel-settings copied to clipboard

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

Open notflip opened this issue 7 years ago • 12 comments

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

notflip avatar Feb 23 '17 12:02 notflip

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

astritzeqiri avatar Feb 24 '17 15:02 astritzeqiri

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 avatar Feb 25 '17 11:02 BirdyUK

@BirdyUK u can also install the dev master branch now

astritzeqiri avatar Feb 25 '17 19:02 astritzeqiri

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

lybuneiv avatar Mar 06 '17 08:03 lybuneiv

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

efriandika avatar Mar 06 '17 08:03 efriandika

and after more than 6 month still no release :)

stojankukrika avatar Aug 22 '17 17:08 stojankukrika

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

vinothsd avatar Sep 02 '17 10:09 vinothsd

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

TiagoSilvaPereira avatar Nov 01 '17 20:11 TiagoSilvaPereira

+1. This is still an issue. Please update

peterkitonga avatar Dec 14 '17 17:12 peterkitonga

+1

Max-Hutschenreiter avatar Oct 15 '19 13:10 Max-Hutschenreiter

+1

fabianmossberg avatar Feb 05 '21 10:02 fabianmossberg

Hello everyone, feel free to contribute.. :D

efriandika avatar Feb 05 '21 10:02 efriandika