From 1fd264ed469f7997086fc417a857dcb0518443e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Witold=20Wis=CC=81niewski?= Date: Fri, 27 Feb 2026 12:15:57 +0100 Subject: [PATCH] Added consultation term channel --- src/Broadcasting/ConsultationChannel.php | 14 ++++++++++++++ src/EscolaLmsConsultationsServiceProvider.php | 1 + src/channels.php | 6 ++++++ 3 files changed, 21 insertions(+) create mode 100644 src/Broadcasting/ConsultationChannel.php create mode 100644 src/channels.php diff --git a/src/Broadcasting/ConsultationChannel.php b/src/Broadcasting/ConsultationChannel.php new file mode 100644 index 0000000..7c381c9 --- /dev/null +++ b/src/Broadcasting/ConsultationChannel.php @@ -0,0 +1,14 @@ +teachers()->where('users.id', '=', $user->getKey())->exists(); + } +} diff --git a/src/EscolaLmsConsultationsServiceProvider.php b/src/EscolaLmsConsultationsServiceProvider.php index e070243..cd82c58 100644 --- a/src/EscolaLmsConsultationsServiceProvider.php +++ b/src/EscolaLmsConsultationsServiceProvider.php @@ -39,6 +39,7 @@ public function boot() $this->loadRoutesFrom(__DIR__ . '/routes.php'); $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'consultation'); + $this->loadRoutesFrom(__DIR__ . '/channels.php'); if ($this->app->runningInConsole()) { $this->bootForConsole(); diff --git a/src/channels.php b/src/channels.php new file mode 100644 index 0000000..27784d4 --- /dev/null +++ b/src/channels.php @@ -0,0 +1,6 @@ + 'auth:api']);