laravel-sketchpad
laravel-sketchpad copied to clipboard
Add auto discovery
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);
}
@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
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