Outsource Laravel Development Partner - $3200/Month | Bacancy

Laravel 5.5.23 Released

Published on by

Laravel 5.5.23 Released image

Never Miss a Laravel Release 🚀

Sign up and get an email with each new Laravel release

Laravel v5.5.23 is now available with the latest additions, changes, and fixes!

This release adds some accessors methods to BelongsToMany by Taylor Otwell, and a firstWhere() method to collections by Joseph Sibler.

???? There’s a new “firstWhere” method coming to the collection class in @laravelphp 5.5.23.

Works the same as “first”, but with operators instead of a callback ???? pic.twitter.com/NrAe0BuX1o

— Joseph Silber (@joseph_silber) December 1, 2017

You can use the firstWhere() works like first() but with operators instead of a callback:

// Default operator is `=`
$firstActiveUser = $users->firstWhere('active', true);
$firstAdultUser = $users->firstWhere('age', '>=', 18);

Typically, you would use first() to do the same before this release:

$firstActiveUser = $users->first(function ($user) {
return $user->active === true;
});
 
$firstAdultUser = $users->first(function ($user) {
return $user->age >= 18;
});

The new firstWhere is an excellent option that I’ve already found myself using in a couple of places, and you can still use first() if you prefer.

Joseph is also known for Bouncer, a package for Laravel roles and ability authorization.

Again, we’d like to thank Till Kruss for putting together the changelog for Laravel releases, and all of the contributors that make Laravel better with each release.

v5.5.23 (2017-12-04)

Added

Changed

  • Pass test value to Collection::when() callbacks (#22224)
  • Support worker sleep time of less than 1s (#22246, #22255)
  • Detect persistent connection resets (#22277)
  • Support chaining seeders (#22288)

Fixed

  • Fixed negative comparison to objects in Collection::where() (#22256)
  • Fixed comparing strings with objects that can be casted to string in Collection::where() (#22295)
  • Fixed integer validation using distinct:ignore_case (#22235)
  • Fixes building nested JSON accessors in MySqlGrammar (#22254)
  • Remove SELECT bindings from MySQL delete statements (#22285)
Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $3200/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit

The latest

View all →
Filament v5.2.0 Adds a Callout Component image

Filament v5.2.0 Adds a Callout Component

Read article
OpenAI Releases GPT-5.3-Codex, a New Codex Model for Agent-Style Development image

OpenAI Releases GPT-5.3-Codex, a New Codex Model for Agent-Style Development

Read article
Claude Opus 4.6 adds adaptive thinking, 128K output, compaction API, and more image

Claude Opus 4.6 adds adaptive thinking, 128K output, compaction API, and more

Read article
Laravel Announces Official AI SDK for Building AI-Powered Apps image

Laravel Announces Official AI SDK for Building AI-Powered Apps

Read article
`hasMany()` Collection Method in Laravel 12.50.0 image

`hasMany()` Collection Method in Laravel 12.50.0

Read article
Mask Sensitive Eloquent Attributes on Retrieval in Laravel image

Mask Sensitive Eloquent Attributes on Retrieval in Laravel

Read article