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

[11.x] Add before and after methods to Collection #9700

Merged
merged 4 commits into from
Jun 18, 2024

Conversation

avosalmon
Copy link
Contributor

Added the before and after Collection methods that have been added in laravel/framework#51752.

collections.md Outdated
<a name="method-before"></a>
#### `before()` {.collection-method}

The `before` method is the opposite of the [`after`](#method-after) method. It returns the item before the given item. It returns `null` if the given item is not found or is the first item:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't cover the strict comparison and closure here since they are mentioned in the after method.

@taylorotwell taylorotwell marked this pull request as draft June 12, 2024 14:08
@taylorotwell
Copy link
Member

Drafting until release.

@taylorotwell taylorotwell marked this pull request as ready for review June 18, 2024 17:43
@taylorotwell taylorotwell merged commit c6cffba into laravel:11.x Jun 18, 2024
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