Skip to content

Commit

Permalink
[5.x] Ensure install:broadcasting is run when installing into Larav…
Browse files Browse the repository at this point in the history
…el 11 application (#10335)

Co-authored-by: duncanmcclean <duncanmcclean@users.noreply.github.com>
  • Loading branch information
duncanmcclean and duncanmcclean authored Jun 19, 2024
1 parent 08270a7 commit 5da7bba
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Console/Commands/InstallCollaboration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5da7bba

Please sign in to comment.