Skip to content

Collection: allow $preserve_keys option on reverse() #9948

@cabloo

Description

@cabloo

Is there a reason the Collection's reverse method doesn't have a $preserve_keys option (see PHP Docs for array_reverse)? Is it simply a PHP version issue?

I ended up having to use collect(array_reverse($points->all(), true)) instead of what I hoped would just be $points->reverse(true).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions