Recursive toArray #237
godismyjudge95
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
I'm not sure, if that's what you mean. I created my own macro called You can find the repo here: https://github.com/the-pulli/collection-macros Maybe the tests give you a clue, what I mean: https://github.com/the-pulli/collection-macros/blob/main/tests/Macros/MapToCollectionTest.php Because I mainly use Collections outside of Laravel, I haven't created a PR (see: #246) But I would be happy to do so, if there is a need for this kind of macro. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I don't know if this is doable but I found a need for doing a recursive toArray on a collection (nested objects that are able to be converted to arrays).
If anyone has an idea of how to do this with existing methods that would be awesome.
Beta Was this translation helpful? Give feedback.
All reactions