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] Added callback support on implode Collection method. #41405

Merged
merged 2 commits into from Mar 9, 2022
Merged

[9.x] Added callback support on implode Collection method. #41405

merged 2 commits into from Mar 9, 2022

Commits on Mar 9, 2022

  1. [9.x] Added callback support on implode Collection method.

    Allow to use a callback as `$value` on `implode` Collection method to simplify -`>map()->implode()` calls:
    
    Before:
    
    ```php
    <span>{{ $user->cities->map(fn ($city) => $city->name.' ('.$city->state->name.')')->implode(', ') }}</span>
    ```
    
    After:
    
    ```php
    <span>{{ $user->cities->implode(fn ($city) => $city->name.' ('.$city->state->name.')', ', ') }}</span>
    ```
    eusonlito committed Mar 9, 2022
    Configuration menu
    Copy the full SHA
    a77f1b6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4994d3b View commit details
    Browse the repository at this point in the history