Skip to content

Conversation

@techmahedy
Copy link
Member

It returns two collections, matched vs unmatched

Example query:

[$admin, $editor] = User::query()
    ->partition(fn($user) => $user->role === 'admin');

return $admin; // Collection of all admin users

@techmahedy techmahedy merged commit 596e32c into doppar:3.x Jan 19, 2026
9 checks passed
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.

1 participant