Laravel 6.11.0 Is Here

Laravel 6.11.0 Is Here

Laravel 6.11 was released this week with a firstWhere eloquent builder method, optimized multi-channel broadcasting in Redis, and the latest fixes and changes in the 6.x branch.

Eloquent firstWhere() method

Caleb Porzio contributed a firstWhere method to the eloquent builder, which is a shortcut for where()->first():

// Before
User::where('emaill', 'foo@bar.com')->first();

// After
User::firstWhere('email', 'foo@bar.com');

This new method is only available in the eloquent builder and is not available in the query builder.

Optimize Redis Multi-channel Broadcasting

Josias Montag contributed an optimization for broadcasting to multiple channels in Redis:

It is pretty common in Laravel to send events to multiple channels at once. Currently, this results in multiple publish commands, all sending the same payload to the Redis server. This causes unnecessary data transfer (costs), especially if the payload is rather big.

You can check out the details of this in Pull Request #31108.

You can see the whole diff between 6.10.0 and 6.11.0 on GitHub. The full release notes for Laravel 6.0 are available in the GitHub in the v6 changelog:

v6.11.0

Added

  • Added Illuminate\Database\Eloquent\Builder::firstWhere() method (#31089)
  • Redis Broadcaster: Broadcast to multiple channels at once (#31108)

Fixed

  • Fixed undefined property in WithFaker::makeFaker() (#31083)
  • Fixed Str::afterLast() method (#31095)
  • Fixed insert float into MySQL with PHP 7.3 (#31100)
  • Fixed refresh on Model with customized pivot attribute name (#31125, 678b26b)

Changed

  • Remove all indentation in blade templates (917ee51)
  • Added mailable names to assertion messages in MailFake::assertNothingSent() and MailFake::assertNothingQueued() (#31106)
  • Search for similar results in assertDatabaseHas() (#31042, 2103eb7)

Filed in: News / Releases
Laravel News Partners

Laravel Jobs

PHP Developer - Full time w/ benefits, US Only
Northern Virginia or Remote (US Only)
Guidance Residential
Full Stack Developer
Remote
Wehaa.com
Laravel API Developer
Las Vegas, NV (Must work on-site)
V Shred
Laravel Developer (Vue, SQL Server)
Remote
World Trade Organization
Web Application Developer (Vue.js & Laravel)
Remote
Apero Creative Development

Newsletter

Join 31,000+ others and never miss out on new tips, tutorials, and more.