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

[9.x] Passthru implode from query builder #43574

Merged
merged 1 commit into from Aug 8, 2022
Merged

[9.x] Passthru implode from query builder #43574

merged 1 commit into from Aug 8, 2022

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.

None yet

2 participants