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

[10.x] Update annotations in wrap method to accommodate Collection instances #48746

Merged

Conversation

salehhashemi1992
Copy link
Contributor

@salehhashemi1992 salehhashemi1992 commented Oct 16, 2023

Update the annotations for the wrap method to reflect that the $data parameter can be either an array or an instance of the Collection class.

This method can handle Collections too:

if ($data instanceof Collection) {
    $data = $data->all();
}

@salehhashemi1992 salehhashemi1992 marked this pull request as ready for review October 16, 2023 20:53
@salehhashemi1992 salehhashemi1992 changed the title Update annotations in wrap method to accommodate Collection instances [10.x] Update annotations in wrap method to accommodate Collection instances Oct 16, 2023
@taylorotwell taylorotwell merged commit 10ba03e into laravel:10.x Oct 18, 2023
20 checks passed
timacdonald pushed a commit to timacdonald/framework that referenced this pull request Oct 24, 2023
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.

None yet

3 participants