Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forget with collections #47637

Merged
merged 3 commits into from
Jul 4, 2023
Merged

Conversation

joelbutcher
Copy link
Contributor

@joelbutcher joelbutcher commented Jul 3, 2023

Resolves #47571

Allows developers to pass a collection of keys to Collection::forget() instead of requiring them to call ->toArray() beforehand.

Before

/** @var Collection $keysToForget */
$keysToForget = $this->getKeysToForget();

return $collection->forget($keysToForget->toArray());

Now

/** @var Collection $keysToForget */
$keysToForget = $this->getKeysToForget();

return $collection->forget($keysToForget);

@taylorotwell taylorotwell merged commit 6b948d9 into laravel:10.x Jul 4, 2023
12 of 16 checks passed
@joelbutcher joelbutcher deleted the forget-with-collections branch October 24, 2023 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collection::forget not accepting Collection as parameter
2 participants