We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df2392b commit 6b06f57Copy full SHA for 6b06f57
app/Listeners/SendTelegramNewArticleNotification.php
@@ -8,8 +8,12 @@
8
9
final class SendTelegramNewArticleNotification
10
{
11
+ public function __construct(
12
+ private AnonymousNotifiable $notifiable
13
+ ) {}
14
+
15
public function handle(ArticleWasCreated $event): void
16
- (new AnonymousNotifiable())->notify(new ArticleSubmitted($event->article));
17
+ $this->notifiable->notify(new ArticleSubmitted($event->article));
18
}
19
0 commit comments