forked from laravel/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] Adds firstOrFail to Illuminate\Support\Collections and Illumina…
…te\Support\LazyCollections (laravel#38420) * Add firstOrFail method to Collections and LazyCollections * Restore test that got moved, fixed some grammaticals in test names * Style fixes * Make take(2) as take(1) instead * use unless instead of when Per Joseph Silber's suggestion Co-authored-by: Joseph Silber <contact@josephsilber.com> * Use Unless instead of When Per Joseph Silber's suggestion Co-authored-by: Joseph Silber <contact@josephsilber.com> * Revert L9 changes, add test requested by @JosephSilber * Remove unneeded try catch * Remove unneeded include * Test that when an enumeration does not contain an item, that firstOrFail enumerates the full collection * Style fix * Update Collection.php * Update LazyCollection.php Co-authored-by: Toby Powell-Blyth <tobypowell-blyth@elasticstage.com> Co-authored-by: Joseph Silber <contact@josephsilber.com> Co-authored-by: Taylor Otwell <taylor@laravel.com>
- Loading branch information
Showing
4 changed files
with
166 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters