'encrypted', 'events' => 'array', 'active' => 'boolean', ]; public function client(): BelongsTo { return $this->belongsTo(Client::class); } public function deliveries(): HasMany { return $this->hasMany(WebhookDelivery::class); } public function subscribesTo(string $event): bool { return $this->active && in_array($event, $this->events ?? [], true); } }