diff --git a/app/Livewire/Project/Database/Clickhouse/General.php b/app/Livewire/Project/Database/Clickhouse/General.php
index 857300926..694674326 100644
--- a/app/Livewire/Project/Database/Clickhouse/General.php
+++ b/app/Livewire/Project/Database/Clickhouse/General.php
@@ -42,12 +42,19 @@ class General extends Component
public bool $isLogDrainEnabled = false;
- public function getListeners()
+ public function getListeners(): array
{
- $teamId = Auth::user()->currentTeam()->id;
+ $user = Auth::user();
+ if (! $user) {
+ return [];
+ }
+ $team = $user->currentTeam();
+ if (! $team) {
+ return [];
+ }
return [
- "echo-private:team.{$teamId},DatabaseProxyStopped" => 'databaseProxyStopped',
+ "echo-private:team.{$team->id},DatabaseProxyStopped" => 'databaseProxyStopped',
];
}
diff --git a/app/Livewire/Project/Database/Dragonfly/General.php b/app/Livewire/Project/Database/Dragonfly/General.php
index 01a474761..f196b9dfb 100644
--- a/app/Livewire/Project/Database/Dragonfly/General.php
+++ b/app/Livewire/Project/Database/Dragonfly/General.php
@@ -40,12 +40,19 @@ class General extends Component
public bool $isLogDrainEnabled = false;
- public function getListeners()
+ public function getListeners(): array
{
- $teamId = Auth::user()->currentTeam()->id;
+ $user = Auth::user();
+ if (! $user) {
+ return [];
+ }
+ $team = $user->currentTeam();
+ if (! $team) {
+ return [];
+ }
return [
- "echo-private:team.{$teamId},DatabaseProxyStopped" => 'databaseProxyStopped',
+ "echo-private:team.{$team->id},DatabaseProxyStopped" => 'databaseProxyStopped',
];
}
diff --git a/app/Livewire/Project/Database/Keydb/General.php b/app/Livewire/Project/Database/Keydb/General.php
index 6031cb7ac..974803e8d 100644
--- a/app/Livewire/Project/Database/Keydb/General.php
+++ b/app/Livewire/Project/Database/Keydb/General.php
@@ -42,12 +42,19 @@ class General extends Component
public bool $isLogDrainEnabled = false;
- public function getListeners()
+ public function getListeners(): array
{
- $teamId = Auth::user()->currentTeam()->id;
+ $user = Auth::user();
+ if (! $user) {
+ return [];
+ }
+ $team = $user->currentTeam();
+ if (! $team) {
+ return [];
+ }
return [
- "echo-private:team.{$teamId},DatabaseProxyStopped" => 'databaseProxyStopped',
+ "echo-private:team.{$team->id},DatabaseProxyStopped" => 'databaseProxyStopped',
];
}
diff --git a/resources/views/components/database-status-info.blade.php b/resources/views/components/database-status-info.blade.php
index a7c8dade1..4a9de3ca5 100644
--- a/resources/views/components/database-status-info.blade.php
+++ b/resources/views/components/database-status-info.blade.php
@@ -63,7 +63,7 @@
@else
@endif
@@ -79,7 +79,7 @@
@else
@foreach ($sslModeOptions as $value => $option)