name('notifications') ->hasCommands(Commands\InstallCommand::class) ->hasConfigFile() ->hasTranslations() ->hasViews(); } public function packageBooted(): void { Livewire::component('notifications', Notifications::class); Livewire::listen('component.dehydrate', function (Component $component, Response $response): Response { if (! Livewire::isLivewireRequest()) { return $response; } if ($component->redirectTo !== null) { return $response; } if (count(session()->get('filament.notifications') ?? []) > 0) { $component->emit('notificationsSent'); } return $response; }); TestableLivewire::mixin(new TestsNotifications()); } }