Skip to content

Conversation

rohstar
Copy link

@rohstar rohstar commented Jan 15, 2018

The share method has been removed from the container. This was a legacy method that has not been documented in several years. so we should begin using the singleton method instead

$this->mergeConfigFrom(__DIR__.'/config/config.php', 'slack');

$this->app['maknz.slack'] = $this->app->share(function ($app) {
$this->app['maknz.slack'] = $this->app->singleton('maknz.slack', function () {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The singleton method doesn't return anything, so it shouldn't be assigned to that Container key.

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

Successfully merging this pull request may close these issues.

2 participants