Skip to content

Commit

Permalink
Only register views for Pulse when Pulse is available (#81)
Browse files Browse the repository at this point in the history
fixes #80

Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone authored Mar 14, 2024
1 parent bcbc8bb commit 63ee810
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ReverbServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 63ee810

Please sign in to comment.