Flarum\Core\Command\ReadNotificationHandler::handle PHP Метод

handle() публичный Метод

public handle ( ReadNotification $command ) : Notification
$command ReadNotification
Результат Flarum\Core\Notification
    public function handle(ReadNotification $command)
    {
        $actor = $command->actor;
        $this->assertRegistered($actor);
        $notification = Notification::where('user_id', $actor->id)->findOrFail($command->notificationId);
        Notification::where(['user_id' => $actor->id, 'type' => $notification->type, 'subject_id' => $notification->subject_id])->update(['is_read' => true]);
        $notification->is_read = true;
        return $notification;
    }
ReadNotificationHandler