Skip to content

Conversation

@ayaebadawy
Copy link

No description provided.

@davestewart
Copy link
Owner

davestewart commented Jul 26, 2017

Hey Aya,

Thanks for this.

How does it work when you want to disable a package in production?

// AppServiceProvider::register
if ($this->app->environment() !== 'production') {
    $this->app->register(\davestewart\sketchpad\SketchpadServiceProvider::class);
}

@amaelftah
Copy link

@davestewart
the package will be auto discovered even if this condition is set in the App service provider , you can disable the package by setting it's name in the dont-discover , then the developer will handle the logic of when to register it or not , like the above condition .

https://medium.com/@taylorotwell/package-auto-discovery-in-laravel-5-5-ea9e3ab20518

@EmilMoe
Copy link
Contributor

EmilMoe commented Oct 9, 2017

Please add this, it will only affect Laravel 5.5 and we can install it as dev and avoid it in production :-)

People can freely use the old method if they want

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.

4 participants