Skip to content

Conversation

@axlon
Copy link
Contributor

@axlon axlon commented Aug 6, 2022

This PR fixes the usage of the implode() method on a eloquent builder.

Before:

>>> App\Models\User::query()->take(3)->implode('id', ',')
=> Illuminate\Database\Eloquent\Builder {#5256}

>>> App\Models\User::query()->take(3)->toBase()->implode('id', ',')
=> "1,2,3"

After:

>>> App\Models\User::query()->take(3)->implode('id', ',')
=> "1,2,3"

>>> App\Models\User::query()->take(3)->toBase()->implode('id', ',')
=> "1,2,3"

An argument could be made that this is a breaking change, but the way this method works currently makes it unusable so its unlikely to break anyone's project. Right now developers are probably using ->toBase()->implode(...) which will still work the same way.

@taylorotwell taylorotwell merged commit aab0275 into laravel:9.x Aug 8, 2022
chu121su12 pushed a commit to chu121su12/framework that referenced this pull request Aug 9, 2022
Ken-vdE pushed a commit to Ken-vdE/framework that referenced this pull request Aug 9, 2022
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.

2 participants