name('filament-notifications') ->hasTranslations() ->hasViews(); } public function packageBooted(): void { FilamentAsset::register([ Js::make('notifications', __DIR__ . '/../dist/index.js'), ], 'filament/notifications'); Livewire::component('database-notifications', DatabaseNotifications::class); Livewire::component('notifications', Notifications::class); on('dehydrate', function (Component $component) { if (! Livewire::isLivewireRequest()) { return; } if (store($component)->has('redirect')) { return; } if (count(session()->get('filament.notifications') ?? []) <= 0) { return; } $component->dispatch('notificationsSent'); }); Testable::mixin(new TestsNotifications()); } }