From 578c882c505fd39bf7b47b4be129fad46c66fba1 Mon Sep 17 00:00:00 2001 From: Al Nahian Date: Wed, 20 Mar 2024 02:01:31 +0600 Subject: [PATCH] [11.x] Re: Fix issue with missing 'js/' directory in broadcasting installation command (#50657) * [11.x] Re: Fix issue with missing 'js/' directory in broadcasting installation command * Update BroadcastingInstallCommand.php --------- Co-authored-by: Taylor Otwell --- .../Foundation/Console/BroadcastingInstallCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php b/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php index 775442735bf0..187e1a8614cc 100644 --- a/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php +++ b/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php @@ -53,6 +53,10 @@ public function handle() // Install bootstrapping... if (! file_exists($echoScriptPath = $this->laravel->resourcePath('js/echo.js'))) { + if (! is_dir($directory = $this->laravel->resourcePath('js'))) { + mkdir($directory, 0755, true); + } + copy(__DIR__.'/stubs/echo-js.stub', $echoScriptPath); }