From a12cd8094f6ca20c51f03e8e864a1c1acb1da9c8 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 14 Mar 2024 12:25:13 +0800 Subject: [PATCH] Only register views for Pulse when Pulse is available fixes #80 Signed-off-by: Mior Muhammad Zaki --- src/ReverbServiceProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ReverbServiceProvider.php b/src/ReverbServiceProvider.php index c46f224e..931c89d3 100644 --- a/src/ReverbServiceProvider.php +++ b/src/ReverbServiceProvider.php @@ -40,9 +40,10 @@ public function boot(): void ], ['reverb', 'reverb-config']); } - $this->loadViewsFrom(__DIR__.'/../resources/views', 'reverb'); if ($this->app->bound(\Laravel\Pulse\Pulse::class)) { + $this->loadViewsFrom(__DIR__.'/../resources/views', 'reverb'); + $this->callAfterResolving('livewire', function (LivewireManager $livewire) { $livewire->component('reverb.messages', Livewire\Messages::class); $livewire->component('reverb.connections', Livewire\Connections::class);