Appearance
PivotChangeSet
php
final readonly class Zairakai\LaravelActivity\Support\PivotChangeSetImmutable 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(): arrayIDs present in after but not in before.
Returns array<int, int|string>
hasChanges()
php
public function hasChanges(): boolReturns true when any ID was added or removed.
removed()
php
public function removed(): arrayIDs present in before but not in after.
Returns array<int, int|string>