diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index ee67f771414..352cce44a3d 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -16,11 +16,6 @@ public function boot() { Broadcast::routes(); - /* - * Authenticate the user's personal channel... - */ - Broadcast::channel('App.User.{userId}', function ($user, $userId) { - return (int) $user->id === (int) $userId; - }); + require base_path('routes/channels.php'); } } diff --git a/config/app.php b/config/app.php index b3f0991aa8a..3036ac7cb4a 100644 --- a/config/app.php +++ b/config/app.php @@ -196,6 +196,7 @@ 'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Auth' => Illuminate\Support\Facades\Auth::class, 'Blade' => Illuminate\Support\Facades\Blade::class, + 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, 'Bus' => Illuminate\Support\Facades\Bus::class, 'Cache' => Illuminate\Support\Facades\Cache::class, 'Config' => Illuminate\Support\Facades\Config::class, diff --git a/routes/channels.php b/routes/channels.php new file mode 100644 index 00000000000..f16a20b9bfc --- /dev/null +++ b/routes/channels.php @@ -0,0 +1,16 @@ +id === (int) $id; +});