Laravel 5.6.14 Released

Published on by

Laravel 5.6.14 Released image

Two Laravel releases have shipped this week: Laravel 5.6.13, released Monday, and Laravel 5.6.14, released on Wednesday. The highlight of these releases for me is the new view:cache artisan command and a few new higher order proxies on the collection class.

New Updates in 5.6.14

Laravel 5.6.14 adds SessionGuard::logoutOtherDevices() which invalidates other sessions for the current user. The application must be using the AuthenticateSession middleware.

A SlackMessage::info() method was added. SlackMessage’s default level is info, but this method allows you to be explicit about it.

Various templates and stubs replaced or with the null coalesce operator. If you want more info on removing or in Laravel 5.7, we wrote about updating your blade templates to use the null coalesce operator ahead of time.

New Updates in 5.6.13

I am extremely excited about the new view:cache command added that caches your blade templates, efficiently allowing you the “warm” your template cache during a deploy, for example!

You can update your deployments to run artisan view:cache to preemptively prime your cache instead of cache happening on-the-fly.

The min() and max() are now higher order proxies on collections:

$ tinker
>>> $accounts = collect([
... (object) ['balance' => 100],
... (object) ['balance' => 200]
... ]);
>>> $accounts->max->balance
=> 200

Two new blade directives, @elseauth and @elseguest were added:

@auth('administrator')
@elseauth('standard')
@endauth

The optional helper now has callback support, which lets you pipe the value into an outside function, which also guarantees that you’re not passing the function null. I think this change is explained clearly by looking at the test added with this new feature:

public function testOptionalWithCallback()
{
$this->assertNull(optional(null, function () {
throw new RuntimeException(
'The optional callback should not be called for null'
);
}));
$this->assertEquals(10, optional(5, function ($number) {
return $number * 2;
}));
}

Using optional without a callback continues to work as usual:

optional($userNoAccount->account)->id // null
optional($user->account)->id; // 2

Here’s the full release notes from the Laravel 5.6 changelog:

v5.6.14 (2018-03-28)

Added

  • Added SlackMessage::info() method (#23711)
  • Added SessionGuard::logoutOtherDevices() method (9c51e49)

Changed

  • Replaced Blade’s or operator with null-coalescing operator (13f732e)

Fixed

  • Get Blade compiler from engine resolver (#23710)
  • Default to an empty string when validating the URL signatures (#23721)

v5.6.13 (2018-03-26)

Added

  • Added view:cache command (9fd1273, 2ab8acf)
  • Added min() and max() to as higher order proxies (#23560)
  • Added @elseauth and @elseguest Blade directives (#23569)
  • Added support for hashing configuration (#23573, d6e3ca9)
  • Allow tagged cache keys to be incremented/decremented (#23578)
  • Added SeeInOrder constraint to avoid risky test notices (#23594, ca39449)
  • Support higher order groupBy() (#23608)
  • Support disabling setting created_at in models (#23667)
  • Added callback support to optional() helper (#23688)
  • Added Eloquent\Collection::loadMorph() method (#23626)

Changed

  • Support generating a signed route with a UrlRoutable parameter (#23584)
  • Use DIRECTORY_SEPARATOR in Application::environmentFilePath() (#23596)
  • Support states on model factory after callbacks (#23551, #23676)
  • Use hash_equals() for verifying URL signatures (#23618)
  • Refactored Exceptions/Handler (f9162c9, 6c5d971)
  • Changed status code of InvalidSignatureException from 401 to 403 (#23662, c99911f)

Fixed

  • Revered breaking changes in ManagesLoops (d0a2613)
  • Set exit status in serve command (#23689)
Paul Redmond photo

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

Filed in:
Cube

Laravel Newsletter

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

Laravel Forge logo

Laravel Forge

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

Laravel Forge
Tinkerwell logo

Tinkerwell

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

Tinkerwell
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $7500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
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
Bacancy logo

Bacancy

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

Bacancy
Lucky Media logo

Lucky Media

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

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a 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
Rector logo

Rector

Your partner for seamless Laravel upgrades, cutting costs, and accelerating innovation for successful companies

Rector
MongoDB logo

MongoDB

Enhance your PHP applications with the powerful integration of MongoDB and Laravel, empowering developers to build applications with ease and efficiency. Support transactional, search, analytics and mobile use cases while using the familiar Eloquent APIs. Discover how MongoDB's flexible, modern database can transform your Laravel applications.

MongoDB

The latest

View all →
Learn to master Query Scopes in Laravel image

Learn to master Query Scopes in Laravel

Read article
How to Redirect Uppercase URLs to Lowercase with Laravel Middleware image

How to Redirect Uppercase URLs to Lowercase with Laravel Middleware

Read article
Generics Added to Eloquent Builder in Laravel 11.15 image

Generics Added to Eloquent Builder in Laravel 11.15

Read article
Manage Roles and Permissions in Filament with Hex Lite image

Manage Roles and Permissions in Filament with Hex Lite

Read article
Laravel Rest Api now supports Laravel Scout image

Laravel Rest Api now supports Laravel Scout

Read article
Build Your SaaS App in Days with SaaSykit image

Build Your SaaS App in Days with SaaSykit

Read article