Skip to content

PivotChangeSet ​

php
final readonly class Zairakai\LaravelActivity\Support\PivotChangeSet

Immutable value object representing a before/after set of pivot IDs.

Used internally to compute which IDs were added or removed during an attach, detach, or sync operation.

Source: src/Support/PivotChangeSet.php

Methods ​

__construct() ​

php
public function __construct(array $before, array $after)

added() ​

php
public function added(): array

IDs present in after but not in before.

Returns array<int, int|string>

hasChanges() ​

php
public function hasChanges(): bool

Returns true when any ID was added or removed.

removed() ​

php
public function removed(): array

IDs present in before but not in after.

Returns array<int, int|string>

Documentation of 3.0.3 , built from 00cc945 on 3.0.3 by pipeline #2949084910 on 2026-10-11.