diff --git a/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php b/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php index 6259c0bf7704..15d45fddfccf 100644 --- a/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php +++ b/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php @@ -32,6 +32,13 @@ class EventServiceProvider extends ServiceProvider */ protected $observers = []; + /** + * Indicates if the email verification listener should be configured. + * + * @var bool + */ + protected $shouldConfigureEmailVerificationListener = true; + /** * Indicates if events should be discovered. * @@ -72,7 +79,9 @@ public function register() }); $this->booted(function () { - $this->configureEmailVerification(); + if ($this->shouldConfigureEmailVerificationListener) { + $this->configureEmailVerification(); + } }); }