Skip to content

EventSubEventFactory ​

php
final class Zairakai\LaravelTwitch\Dto\EventSub\EventSubEventFactory

Resolves a raw EventSub notification into its typed DTO.

Covers the full EventSub subscription type catalog (77 types, verified against the official example payloads on 2026-08-09, channel.bits.use added 2026-08-13 - drop.entitlement.grant deliberately left out: it is organization/campaign-scoped, not broadcaster-scoped, and its exact payload shape is not fully published in the official docs). Any future type Twitch adds before this factory is updated still falls back to GenericEventSubEvent - no notification is ever silently dropped or left untyped at the object level.

Source: src/Dto/EventSub/EventSubEventFactory.php

Methods ​

make() ​

php
public static function make(string $type, array $payload): EventSubEvent
ParameterDescription
$typeSubscription type as sent by Twitch (e.g. channel.follow)
$payloadRaw event object from the notification

Documentation of 4.1.4 , built from a03e949 on 4.1.4 by pipeline #2949087255 on 2026-10-11.