id === $item->user_id; } /** * Ownership of collection condition * * @template TKey of array-key * @template TValue * * @param \Illuminate\Contracts\Support\Arrayable|iterable $items * @return bool */ protected function isOwnerOfEach(User $user, $items) { foreach ($items as $item) { if (! $this->isOwnerOf($user, $item)) { return false; } } return true; } }