How Do I

Replace a default resolver

Bind custom context resolution or preference storage services.

Implement NotificationContextResolver when your notification context cannot be discovered with the notificationContext convention:

app/Support/ApplicationNotificationContextResolver.php
final class ApplicationNotificationContextResolver implements NotificationContextResolver
{
    public function resolve(object $notification, object $notifiable): ?NotificationContext
    {
        return null;
    }
}

Bind the implementation in an application service provider. Use MutableNotificationPreferenceStore when you also need to replace the default Eloquent persistence layer.

Keep the resolver and store deterministic: the same notification, notifiable, channel, and context should produce the same result.