notifications = $notifications; } /** * @param ReadAllNotifications $command * @throws \Flarum\User\Exception\PermissionDeniedException */ public function handle(ReadAllNotifications $command) { $actor = $command->actor; $actor->assertRegistered(); $this->notifications->markAllAsRead($actor); } }