We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ArrangeBy
Similar to IndexBy, this option will arrange records by a value.
IndexBy
For example
$userQuery = new ActiveQuery(User::class, $db); $users = $userQuery->arrangeBy('status')->all();
The result is
[ 'active' => [ 0 => User, 1 => User, 2 => User, ], 'inactive' => [ 0 => User, 1 => User, ], ];
The text was updated successfully, but these errors were encountered:
It's also will be userfull in Query from Yii DB.
Query
Sorry, something went wrong.
No branches or pull requests
Similar to
IndexBy
, this option will arrange records by a value.For example
The result is
The text was updated successfully, but these errors were encountered: