diff --git a/src/Console/Commands/InstallCollaboration.php b/src/Console/Commands/InstallCollaboration.php index a7e1981702..e4b4a46756 100644 --- a/src/Console/Commands/InstallCollaboration.php +++ b/src/Console/Commands/InstallCollaboration.php @@ -56,15 +56,15 @@ public function handle() protected function enableBroadcasting(): void { - if (in_array(\Illuminate\Broadcasting\BroadcastServiceProvider::class, array_keys(app()->getLoadedProviders()))) { - $this->components->warn('Broadcasting is already enabled.'); + if (version_compare(app()->version(), '11', '<')) { + $this->enableBroadcastServiceProvider(); + $this->components->info('Broadcasting enabled successfully.'); return; } - if (version_compare(app()->version(), '11', '<')) { - $this->enableBroadcastServiceProvider(); - $this->components->info('Broadcasting enabled successfully.'); + if (File::exists(config_path('broadcasting.php'))) { + $this->components->warn('Broadcasting is already enabled.'); return; }