Skip to content

Commit

Permalink
Unbind wizard cache to container
Browse files Browse the repository at this point in the history
  • Loading branch information
ycs77 committed Jun 15, 2019
1 parent fe9bda0 commit 4d51860
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion src/Wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function cache()
*/
public function setCache($cache = null)
{
$this->cache = $cache ?? $this->app['wizard.cache'];
$this->cache = $cache ?? new CacheManager($this, $this->app);
return $this;
}

Expand Down
9 changes: 0 additions & 9 deletions src/WizardServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,7 @@ public function register()
return new Wizard($app);
});

$this->app->singleton('wizard.cache', function ($app) {
return new CacheManager($app['wizard'], $app);
});

$this->app->singleton('wizard.cache.store', function ($app) {
return $app['wizard.cache']->driver();
});

$this->app->alias('wizard', Wizard::class);
$this->app->alias('wizard.cache', CacheManager::class);

$this->mergeConfigFrom(__DIR__ . '/../config/wizard.php', 'wizard');
}
Expand Down

0 comments on commit 4d51860

Please sign in to comment.