Custom DatabaseNotification class

Hi. I need to use a custom DatabaseNotification class instead of this: https://github.com/filamentphp/filament/blob/3.x/packages/notifications/src/DatabaseNotification.php.

I've tried extending the Filament\Notifications\Notification class and overriding the toDatabasemethod but it's return typed, which makes it difficult:

toDatabase() must be compatible with Filament\Notifications\Notification::toDatabase(): Filament\Notifications\DatabaseNotification


Any ideas on how to work around this? Alternatively I'm wondering if I should submit a PR to remove the typing.
Was this page helpful?