diff --git a/src/Broadcasting/WebinarChannel.php b/src/Broadcasting/WebinarChannel.php new file mode 100644 index 0000000..1929ad6 --- /dev/null +++ b/src/Broadcasting/WebinarChannel.php @@ -0,0 +1,14 @@ +trainers()->where('users.id', '=', $user->getKey())->exists(); + } +} diff --git a/src/EscolaLmsWebinarServiceProvider.php b/src/EscolaLmsWebinarServiceProvider.php index 327ee32..b4baa2c 100644 --- a/src/EscolaLmsWebinarServiceProvider.php +++ b/src/EscolaLmsWebinarServiceProvider.php @@ -34,6 +34,7 @@ public function boot() $this->loadRoutesFrom(__DIR__ . '/routes.php'); $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'webinar'); + $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..0c78177 --- /dev/null +++ b/src/channels.php @@ -0,0 +1,6 @@ + 'auth:api']);