public function diffKeys($items) { return new static(array_diff_key($this->items, $this->getArrayableItems($items))); }
public function testDiffKeys() { $c1 = new Collection(['id' => 1, 'first_word' => 'Hello']); $c2 = new Collection(['id' => 123, 'foo_bar' => 'Hello']); $this->assertEquals(['first_word' => 'Hello'], $c1->diffKeys($c2)->all()); }