app->make(NotificationTypeRegistry::class)->register(new NotificationTypeDefinition( key: 'file_comment.posted', label: 'Someone commented on a file', template: ':authorName commented on ":fileName"', defaultEmailEnabled: true, digestMail: CommentPostedNotification::class, digestMailMany: CommentDigestNotification::class, url: fn (array $data): string => route('comments.go', $data['fileId']), )); $this->app->make(NotificationTypeRegistry::class)->register(new NotificationTypeDefinition( key: 'file_comment.pending', label: 'A comment is waiting for approval', template: ':authorName commented on ":fileName" and is waiting for approval', // Straight to the held ones. The screen lists every comment, so // an unfiltered link would land the moderator in a haystack // containing the thing they were told about. url: fn (array $data): string => route('comments.index', ['status' => 'pending']), )); } }