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']);