Luka Posted May 5, 2020 Share Posted May 5, 2020 Hi. I can't understand why explode method doesn't work I expect to get [ 'test' => [ 'a' => 'b' ], 'test2' => [ 'a' => 'b' ] ] But I get Link to comment Share on other sites More sharing options...
MoritzLost Posted May 5, 2020 Share Posted May 5, 2020 Based on the explode documentation I agree with your expected result. The reason your code doesn't work is that the callback is never called if the WireArray items are not objects. Not sure if that is intentional, but the documentation is definitely misleading on this one. I also see no reason why the callback variant shouldn't work for non-object items. You should open an issue on Github for this bug! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now